예제 #1
0
 void NewRace_Click(object sender, EventArgs e)
 {
     if (ShowSRLRules())
     {
         var gameName = CurrentState.Run.GameName;
         var gameCategory = CurrentState.Run.CategoryName;
         var inputBox = new NewRaceInputBox();
         TopMost = false;
         var result = inputBox.Show(ref gameName, ref gameCategory);
         if (result == DialogResult.OK)
         {
             var id = SpeedRunsLiveAPI.Instance.GetGameIDFromName(gameName);
             if (id == null)
             {
                 id = "new";
                 gameCategory = gameName + " - " + gameCategory;
                 gameName = "New Game";
             }
             var form = new SpeedRunsLiveForm(CurrentState, Model, gameName, id, gameCategory);
             form.Show(this);
         }
         TopMost = CurrentState.LayoutSettings.AlwaysOnTop;
     }
 }
예제 #2
0
 void Race_Click(object sender, EventArgs e)
 {
     if (ShowSRLRules())
     {
         var raceId = (sender as ToolStripMenuItem).Tag.ToString();
         var form = new SpeedRunsLiveForm(CurrentState, Model, raceId);
         TopMost = false;
         form.Show(this);
         TopMost = CurrentState.LayoutSettings.AlwaysOnTop;
     }
 }