Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
0V committed Nov 21, 2014
1 parent 37e50cf commit 516a46a
Show file tree
Hide file tree
Showing 62 changed files with 145,896 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
157 changes: 157 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates
*.sln.ide/

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf


#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac desktop service store files
.DS_Store
22 changes: 22 additions & 0 deletions MohyoButton.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22310.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MohyoButton", "MohyoButton\MohyoButton.csproj", "{67D92547-1FFA-40AF-81F2-1E9EF546E1FC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{67D92547-1FFA-40AF-81F2-1E9EF546E1FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67D92547-1FFA-40AF-81F2-1E9EF546E1FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67D92547-1FFA-40AF-81F2-1E9EF546E1FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67D92547-1FFA-40AF-81F2-1E9EF546E1FC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions MohyoButton/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
11 changes: 11 additions & 0 deletions MohyoButton/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Application x:Class="MohyoButton.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MohyoButton"
StartupUri="View/MainWindow.xaml"
Startup="Application_Startup"
>
<Application.Resources>

</Application.Resources>
</Application>
57 changes: 57 additions & 0 deletions MohyoButton/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using CoreTweet;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace MohyoButton
{
/// <summary>
/// App.xaml の相互作用ロジック
/// </summary>
public partial class App : Application
{

private static LoginWindow _LoginWindow = new LoginWindow();
public static LoginWindow LoginWindowInstance { get { return _LoginWindow; } set { _LoginWindow = value; } }

public const string ConsumerKey = "yQLCCq8XjKUes6kzptst06LYD";
public const string ConsumerSecret = "l2OEujoHJMgdME7uwLSbNzhQ73ImKKVjpSI7uDSr7tZPXaEJSp";

public static Tokens Token { get; set; }
public static OAuth.OAuthSession Session { get; set; }

private void Application_Startup(object sender, StartupEventArgs e)
{
AppDomain.CurrentDomain.UnhandledException += ((_sender, _e) =>
ShowErrorMessage((Exception)_e.ExceptionObject));

}

/// <summary>
/// †ガバガバ例外処理†
/// </summary>
/// <param name="ex"></param>
public static void ShowErrorMessage(Exception ex)
{
var twitterException = ex as TwitterException;
if (twitterException != null)
{
if (twitterException.Message != null)
MessageBox.Show("Twitter のエラーが発生しました。プログラムを終了します。\n"+ twitterException.Message, "†ガバガバ例外処理†", MessageBoxButton.OK, MessageBoxImage.Error);
else
MessageBox.Show("Twitter のエラーが発生しました。プログラムを終了します。", "†ガバガバ例外処理†", MessageBoxButton.OK, MessageBoxImage.Error);
}
else
{
MessageBox.Show("エラーが発生しました。プログラムを終了します。\n" + ex.Message, "†ガバガバ例外処理†", MessageBoxButton.OK, MessageBoxImage.Error);
}

App.Current.Shutdown(-1);
Environment.Exit(-1);
}
}
}
28 changes: 28 additions & 0 deletions MohyoButton/Models/KeyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MohyoButton.Models
{
public class KeyInfo
{
/// <summary>
/// Consumer Key
/// </summary>
public string ConsumerKey;
/// <summary>
/// Consumer Secret
/// </summary>
public string ConsumerSecret;
/// <summary>
/// Access Token
/// </summary>
public string AccessToken;
/// <summary>
/// Access TOken Secret
/// </summary>
public string AccessTokenSecret;
}
}
Loading

0 comments on commit 516a46a

Please sign in to comment.