/// <summary>
        /// Initializes a new instance of BrowseViewModel class.
        /// </summary>
        public BrowseViewModel(ProgramEditor commandHistory, ProgramEditor commandInput)
        {
            DeclareCommands();

            this.commandInput            = commandInput;
            commandInput.PreviewKeyDown += commandInput_PreviewKeyDown;
            commandInput.TextChanged    += commandInput_TextChanged;

            this.commandHistory = commandHistory;
            commandHistory.PreviewMouseWheel += commandHistory_PreviewMouseWheel;

            MessageList = new MessageList();
            Settings    = DriverSettings.CreateDefaultSettings();

            //this should be removed later on
            manipulator    = new E3JManipulator(DriverSettings.CreateDefaultSettings());
            programService = new ProgramService(manipulator);

            RemotePrograms = new ObservableCollection <RemoteProgram>(new List <RemoteProgram>())
            {
                new RemoteProgram("Pierwszy", 2567, "10-03-15 11:12:56"),
                new RemoteProgram("Wtorek", 1200, "08-06-17 09:34:43"),
                new RemoteProgram("Asd", 45, "17-11-24 04:32:23"),
                new RemoteProgram("qwerty", 52789, "29-09-32 18:14:32")
            };
        }
예제 #2
0
파일: Form1.cs 프로젝트: m4te0/Roboty
 public Form1()
 {
     InitializeComponent();
     foreach (var port in SerialPort.GetPortNames())
     {
         comboBoxPorts.Items.Add(port);
     }
     manipulator = File.Exists("SerialSettings.json") ?
                   new E3JManipulator(DriverSettings.CreateFromSettingFile()) :
                   new E3JManipulator(DriverSettings.CreateDefaultSettings());
     manipulator.Port.DataReceived            += Port_DataReceived;
     manipulator.Port.ConnectionStatusChanged += Port_ConnectionStatusChanged;
 }
        /// <summary>
        /// Initializes a new instance of BrowseViewModel class.
        /// </summary>
        /// <param name="commandHistory">The command history.</param>
        /// <param name="commandInput">The command input.</param>
        public BrowseViewModel(ProgramEditor commandHistory, ProgramEditor commandInput)
        {
            DeclareCommands();

            this.commandInput            = commandInput;
            commandInput.PreviewKeyDown += commandInput_PreviewKeyDown;
            commandInput.TextChanged    += commandInput_TextChanged;

            this.commandHistory = commandHistory;
            commandHistory.PreviewMouseWheel += commandHistory_PreviewMouseWheel;

            MessageList = new MessageList();
            Settings    = DriverSettings.CreateDefaultSettings();
            //this should be removed later on
            manipulator = new E3JManipulator(DriverSettings.CreateDefaultSettings());
        }