Example #1
0
 /// <summary>
 /// Handles the Click event of the LoadMultiple control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 private void LoadMultiple_Click(object sender, RoutedEventArgs e)
 {
     this.currentOption = MachineOptions.Initialized;
     this.EnableOrDisableMachineOptions();
     this.currentOptionGraph = GraphOptions.Initialized;
     this.EnableOrDisableGraphOptions();
     this.OpenMachine();
 }
Example #2
0
 /// <summary>
 /// Loads new configuration
 /// </summary>
 private void LoadConfig_Click(object sender, RoutedEventArgs e)
 {
     this.currentOption = MachineOptions.Initialized;
     this.EnableOrDisableMachineOptions();
     this.currentOptionGraph = GraphOptions.Initialized;
     this.EnableOrDisableGraphOptions();
     this.OpenNewVersion();
 }
Example #3
0
    /// <summary>
    /// Initializes a new instance of the <see cref="FSMView"/> class.
    /// </summary>
    public FSMView()
    {
      this.InitializeComponent();

      this.currentOptionGraph = GraphOptions.Uninitialized;
      this.currentOption = MachineOptions.Uninitialized;
      this.EnableOrDisableMachineOptions();
      this.EnableOrDisableGraphOptions();
    }
Example #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FSMView"/> class.
        /// </summary>
        public FSMView()
        {
            this.InitializeComponent();

            this.currentOptionGraph = GraphOptions.Uninitialized;
            this.currentOption      = MachineOptions.Uninitialized;
            this.EnableOrDisableMachineOptions();
            this.EnableOrDisableGraphOptions();
        }
Example #5
0
        /// <summary>
        /// Opens the new version.
        /// </summary>
        private void OpenNewVersion()
        {
            Version auxVersion = new Version(); ////make a new version

            auxVersion.GetVersion();
            if (auxVersion.ID != 0)
            {
                this.version = auxVersion;
                if (this.version.ID == 1)
                {
                    this.machine = new FirstStateMachine(this.version);
                    this.machine.GetDates();
                    cbSequences.ItemsSource = ((FirstStateMachine)this.machine).Sequences.ArrayOfSequence.ToList();
                }
                else
                {
                    if (this.version.ID == 2)
                    {
                        this.machine = new SecondStateMachine(this.version);
                        this.machine.GetDates();
                        cbSequences.ItemsSource = ((SecondStateMachine)this.machine).Sequences.ArrayOfSequence.ToList();
                    }
                }

                this.DataContext = this.machine.MyGraph;
                console.Text    += "A new version opened successfully!\r\n";
                scrConsole.ScrollToEnd();
            }
            else
            {
                console.Text += "There is no version for this type of xml or you didn't select both files!\r\n";
                scrConsole.ScrollToEnd();
                this.currentOption      = MachineOptions.Uninitialized;
                this.currentOptionGraph = GraphOptions.Uninitialized;
                this.EnableOrDisableMachineOptions();
                this.EnableOrDisableGraphOptions();
            }
        }
Example #6
0
    /// <summary>
    /// Opens the new version.
    /// </summary>
    private void OpenNewVersion()
    {
      Version auxVersion = new Version(); ////make a new version
      auxVersion.GetVersion();
      if (auxVersion.ID != 0)
      {
        this.version = auxVersion;
        if (this.version.ID == 1)
        {
          this.machine = new FirstStateMachine(this.version);
          this.machine.GetDates();
          cbSequences.ItemsSource = ((FirstStateMachine)this.machine).Sequences.ArrayOfSequence.ToList();
        }
        else
        {
          if (this.version.ID == 2)
          {
            this.machine = new SecondStateMachine(this.version);
            this.machine.GetDates();
            cbSequences.ItemsSource = ((SecondStateMachine)this.machine).Sequences.ArrayOfSequence.ToList();
          }
        }

        this.DataContext = this.machine.MyGraph;
        console.Text += "A new version opened successfully!\r\n";
        scrConsole.ScrollToEnd();
      }
      else
      {
        console.Text += "There is no version for this type of xml or you didn't select both files!\r\n";
        scrConsole.ScrollToEnd();
        this.currentOption = MachineOptions.Uninitialized;
        this.currentOptionGraph = GraphOptions.Uninitialized;
        this.EnableOrDisableMachineOptions();
        this.EnableOrDisableGraphOptions();
      }
    }
Example #7
0
 /// <summary>
 /// Handles the Click event of the LoadMultiple control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 private void LoadMultiple_Click(object sender, RoutedEventArgs e)
 {
   this.currentOption = MachineOptions.Initialized;
   this.EnableOrDisableMachineOptions();
   this.currentOptionGraph = GraphOptions.Initialized;
   this.EnableOrDisableGraphOptions();
   this.OpenMachine();
 }
Example #8
0
 /// <summary>
 /// Loads new configuration
 /// </summary>
 private void LoadConfig_Click(object sender, RoutedEventArgs e)
 {
   this.currentOption = MachineOptions.Initialized;
   this.EnableOrDisableMachineOptions();
   this.currentOptionGraph = GraphOptions.Initialized;
   this.EnableOrDisableGraphOptions();
   this.OpenNewVersion();
 }