Beispiel #1
0
 public void Loaded()
 {
     KeyAssignCore.RegisterOperation("SookIkemen", () =>
                                     KeyAssignHelper.ExecuteTabAction(tab =>
     {
         try
         {
             tab.TabProperty.LinkAccountInfos.ForEach(a =>
                                                      PostOffice.UpdateTweet(a, "スークイケメンナーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー #sook_ikemen"));
         }
         catch (Exception e)
         {
             ExceptionStorage.Register(e, ExceptionCategory.PluginError, "スークイケメンナーーーーーーーーーーーーーーに失敗しました: " + e.Message);
         }
     }));
     KeyAssignCore.RegisterOperation("SenselessRetweet", () =>
                                     KeyAssignHelper.ExecuteTVMAction(tvm =>
     {
         var ts = tvm.Tweet.Status as TwitterStatus;
         if (ts == null)
         {
             return;
         }
         KernelService.MainWindowViewModel.InputBlockViewModel.SetOpenText(true, true);
         KernelService.MainWindowViewModel.InputBlockViewModel.SetText(BuildSenseless(ts));
     }));
     KeyAssignCore.RegisterOperation("SenselessRetweetFast", () =>
                                     KeyAssignHelper.ExecuteTVMAction(tvm =>
     {
         try
         {
             var ts = tvm.Tweet.Status as TwitterStatus;
             if (ts == null)
             {
                 return;
             }
             tvm.Parent.TabProperty.LinkAccountInfos.ForEach(
                 ai => PostOffice.UpdateTweet(ai, BuildSenseless(ts)));
         }
         catch (Exception e)
         {
             ExceptionStorage.Register(e, ExceptionCategory.PluginError, "非常識RTに失敗しました: " + e.Message);
         }
     }));
     KernelService.AddMenu("スークイケメンナー", () =>
                           KeyAssignHelper.ExecuteTabAction(tab =>
     {
         try
         {
             tab.TabProperty.LinkAccountInfos.ForEach(a =>
                                                      PostOffice.UpdateTweet(a, "スークイケメンナーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー #sook_ikemen"));
         }
         catch (Exception e)
         {
             ExceptionStorage.Register(e, ExceptionCategory.PluginError, "スークイケメンナーーーーーーーーーーーーーーに失敗しました: " + e.Message);
         }
     }));
 }
Beispiel #2
0
 private void ExecTVMAction(Action <TabDependentTweetViewModel> action)
 {
     KeyAssignHelper.ExecuteTVMAction(action);
 }