Example #1
0
 private void BtnGoToNextRoll_Click(object sender, EventArgs e)
 {
     using (var dlg = new MoveToNextDialog
     {
         RollNumber = this.logic.CurrentRoll.RollNo,
         RollLength = (int)this.logic.MeasuredLength,
         MaxLength = (int)this.logic.MeasuredLength,
     })
     {
         if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.logic.MoveToNextRoll(dlg.RollLength);
         }
     }
 }
Example #2
0
 private async Task ExecuteMoveToNextButtonCmdAsync(object sender, string rollNo, long measuredLength)
 {
     using (var dlg = new MoveToNextDialog
     {
         RollNumber = rollNo,
         RollLength = (int)measuredLength,
         MaxLength = (int)measuredLength,
     })
     {
         if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             await this.ExecuteButtonCmdAsync(sender, Ipc.MahloIpcClient.MoveToNextRollCommand, dlg.RollLength);
         }
     }
 }