Beispiel #1
0
        public NotesViewModel(Grid grid)
        {
            _rAController    = RAController.GetInstance();
            _toastController = ToastController.GetInstance();
            _toastController.InitializeComponents(grid);

            Notes        = new ObservableCollection <NoteModel>();
            SelectedNote = new NoteModel();

            Items        = CollectionViewSource.GetDefaultView(Notes);
            Items.Filter = FilterPerson;

            WidthMainGrid = 360.0d;

            ListNotesVisibility         = Visibility.Visible;
            ElementsManagmentVisibility = Visibility.Visible;
            MenuVisibility        = Visibility.Hidden;
            SearchGridVisibility  = Visibility.Visible;
            RightSectorVisibility = Visibility.Hidden;

            AddCommand    = new DelegateCommand(AddNoteAsync);
            EditCommand   = new DelegateCommand(EditNote);
            DeleteCommand = new DelegateCommand(DeleteNote);
            GetCommand    = new DelegateCommand(GetNotes);

            LoadImageCommand = new DelegateCommand(LoadImage);
            CancelCommand    = new DelegateCommand(CancelAdd);
            OpenMenuCommand  = new DelegateCommand(OpenMenu);

            EditImageCommand = new DelegateCommand(EditImage);

            GetNotes(null);
        }
Beispiel #2
0
 public SchedulerForm(RAController rac)
 {
     InitializeComponent();
     routineScheduler = new RoutineScheduler(rac);
     targetFile       = "";
     refreshScheduleTable();
     this.Show();
     this.Hide();
 }
Beispiel #3
0
 public PlaybackForm(RAController rac)
 {
     raController = rac;
     InitializeComponent();
     speed  = 1;
     loops  = 1;
     status = PlaybackStatus.Nothing;
     this.Show();
     this.Hide();
 }
Beispiel #4
0
        public MainForm()
        {
            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            InitializeComponent();
            raController = new RAController();
            //init forms
            playbackForm  = new PlaybackForm(raController);
            macroForm     = new SettingsForm();
            schedulerForm = new SchedulerForm(raController);



            // load in the current macro setting
            try
            {
                macroKeys = new List <int>(MacroLoader.loadMacro(Directory.GetCurrentDirectory() + "/macro.config"));
            } catch (FileNotFoundException ex)
            {
                Console.WriteLine("Process is being controller by System");
                macroKeys = new List <int>(MacroLoader.loadMacro(Environment.GetCommandLineArgs()[1]));
                Console.WriteLine(ex);
            }
            RoutineListener.Start(macroKeys.ToArray());
        }
Beispiel #5
0
 public RoutineScheduler(RAController rac)
 {
     raController = rac;
 }