// GET: Home public ActionResult Index() { //FormsAuthentication.SignOut(); TwManager tw = new TwManager(); tw.StartHangfire(); return(RedirectToAction("Login")); }
public MainWindow() { InitializeComponent(); Model = new MainViewModel(); this.DataContext = Model; // しばらくオプション増える予定ないし、コマンドラインの解析はさぼる。。。 bool isLogging = false; foreach (string line in App.CommandLineArgs) { if (line.Equals("debug")) { isLogging = true; } } Logger.init(Directory.GetParent(Assembly.GetEntryAssembly().Location) + @"\debug.log", isLogging); try { Receiver = new MainWindowReceiver(this); Manager = new TwManager(Receiver); } catch (TwException ex) { Logger.Instance.PutMessage(ex.Message); MessageBox.Show(ex.Message, "起動できません", MessageBoxButton.OK); Application.Current.Shutdown(); } // コントロールの初期値を設定 chkBossAnnounce.IsEnabled = false; btnEnd.IsEnabled = false; // コントロールの値を設定ファイルから読み込んだ内容に変更 Settings = LoadSettings(); txtBouyomiPath.Text = Settings.BousyomiChanSettings.exeFilePath; chkBouyomi.IsChecked = Settings.BousyomiChanSettings.IsEnabled; chkBossAnnounce.IsChecked = Settings.BousyomiChanSettings.IsBossAnnounceEnabled; DispatcherTimer timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(1000); timer.Tick += Timer_Tick; timer.Start(); }