Exemplo n.º 1
0
        public MainWindow()
        {
            var viewModel = new ViewModel.ViewModel();

            InitializeComponent();
            DataContext = viewModel;
        }
Exemplo n.º 2
0
        public MainPage()
        {
            this.InitializeComponent();
            var viewModel = new ViewModel.ViewModel();

            DataContext = viewModel;
        }
Exemplo n.º 3
0
 public RoomInfoCatalog(ViewModel.ViewModel vm)
 {
     BookingInfoVm = vm;
     Rooms         = new ObservableCollection <Room>();
     // Web API Uri link .........
     FetchAllData();
 }
Exemplo n.º 4
0
 // inject View Model into HotelInfoCatalog
 public HotelInfoCatalog(ViewModel.ViewModel vm)
 {
     BookingInfoVm = vm;
     Hotels        = new ObservableCollection <Hotel>();
     // Web API Uri link .........
     FetchAllData();
 }
Exemplo n.º 5
0
        private void App_Startup(Object sender, StartupEventArgs e)
        {
            // Create the persistence
            _persistence = new Persistence.Persistence();

            // Create the model and inject the persistence
            _model = new Model.Model(_persistence);

            // Create the view model and inject the model
            _viewModel = new ViewModel.ViewModel(_model);
            _viewModel.LoadConfiguration += new EventHandler(ViewModel_LoadConfiguration);
            _viewModel.Play += new EventHandler(ViewModel_Play);
            _viewModel.Step += new EventHandler(ViewModel_Step);
            //_viewModel.Pause += new EventHandler(ViewModel_Pause);
            _viewModel.CanvasClick          += new EventHandler(ViewModel_CanvasClicked);
            _viewModel.OpenNewPatternWindow += new EventHandler(ViewModel_OpenNewPatternWindow);
            _viewModel.CreatePattern        += new EventHandler <ViewModel.NewPatternEventArgs>(ViewModel_CreatePattern);

            // Create the view
            _view             = new MainWindow();
            _view.DataContext = _viewModel;
            _view.Show();

            // Create the timer
            _timer          = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromSeconds(0.1);
            _timer.Tick    += new EventHandler(TimerTick);
        }
Exemplo n.º 6
0
        public void ShowWindow(string window, ViewModel.ViewModel viewModel)
        {
            switch (window)
            {
            case "Editor":
                _editor = new Editor(viewModel);
                _editor.ShowDialog();
                break;

            case "Library":
                if (_library == null)
                {
                    _library = new Library();
                }
                _library.Show();
                break;

            case "Reader":
                _reader = new Reader(viewModel);
                _reader.ShowDialog();
                break;

            case "InputText":
                _inputText = new InputText(viewModel);
                _inputText.ShowDialog();
                break;
            }
        }
Exemplo n.º 7
0
        public Animation(ViewModel.ViewModel ViewModel)
        {
            this.ViewModel = ViewModel;

            valueFixFrequency[0, 0] = 22;
            valueFixFrequency[0, 1] = 23.5;
            valueFixFrequency[0, 2] = 25.6;
            valueFixFrequency[0, 3] = 31;
            valueFixFrequency[1, 0] = 39 - 15.75;
            valueFixFrequency[1, 1] = 43 - 15.75;
            valueFixFrequency[1, 2] = 47 - 15.75;
            valueFixFrequency[1, 3] = 51 - 15.75;

            valueFixAntenna[0, 0] = 0;
            valueFixAntenna[0, 1] = 10;
            valueFixAntenna[0, 2] = 45;
            valueFixAntenna[0, 3] = 90;
            valueFixAntenna[1, 0] = 135;
            valueFixAntenna[1, 1] = 180;
            valueFixAntenna[1, 2] = 225;
            valueFixAntenna[1, 3] = 270;

            dispatcherTimer = new DispatcherTimer
            {
                Interval = TimeSpan.FromMilliseconds(1000 / 40)
            };
            dispatcherTimer.Tick += new EventHandler(DispatcherTimer_Tick);


            dispatcherSleep = new DispatcherTimer
            {
                Interval = TimeSpan.FromMilliseconds(1000 / 2)
            };
            dispatcherSleep.Tick += new EventHandler(DispatcherSleep_Tick);
        }
Exemplo n.º 8
0
 /// <summary>
 /// Загрузка страниц и помещения в них ViewModel для патерна MVVM
 /// </summary>
 public LoadWpf()
 {
     ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
     UserControls[0] = new Applications(viewModel);
     UserControls[1] = new Fulfilled(viewModel);
     UserControls[2] = new Statistics(viewModel);
 }
Exemplo n.º 9
0
 public GuestInfoCatalog(ViewModel.ViewModel vm)
 {
     BookingInfoVm = vm;
     Guests        = new ObservableCollection <Guest>();
     // Web API Uri link .........
     FetchAllData();
 }
Exemplo n.º 10
0
        public Spielfeld() {
            InitializeComponent();

            viewModel = new ViewModel.ViewModel(new VierGewinntSpiel());

            spielfeldControl.ViewModel = viewModel;
            spielfeldControl.SpalteClicked += OnSpalteClicked;
        }
Exemplo n.º 11
0
        public ImageService(ViewModel.ViewModel vm, ICameraGrid cameraGrid)
        {
            this._vm         = vm;
            this._cameraGrid = cameraGrid;

            this._trackBmp = SKBitmap.Decode(@"./Images/track.png");
            this._carBmp   = SKBitmap.Decode(@"./Images/car.png");
        }
Exemplo n.º 12
0
        public MainModel(InteriorModel interiorModel, Animation animation, ViewModel.ViewModel viewModel)
        {
            this.animation     = animation;
            this.interiorModel = interiorModel;

            Frequency = new RotaticgPropertyOfModel(
                interiorModel.Frequency,
                (value) => viewModel.FrequencyAngle = Converter.Frequency.ToAngle(value));

            Volume = new RotaticgPropertyOfModel(
                interiorModel.Volume,
                (value) => viewModel.VolumeAngle = Converter.Volume.ToAngle(value));

            Noise = new RotaticgPropertyOfModel(
                interiorModel.Noise,
                (value) => viewModel.NoiseAngle = Converter.Noise.ToAngle(value));

            Antenna = new RotaticgPropertyOfModel(
                interiorModel.Antenna,
                (value) => viewModel.AntennaAngle = Converter.Antenna.ToAngle(value));

            Power = new PropertyOfModel <Turned>(
                interiorModel.Power,
                (value) => viewModel.PowerValue = Converter.TurnedState.ToBoolean(value));

            Scale = new PropertyOfModel <Turned>(
                interiorModel.Scale,
                (value) => viewModel.ScaleValue = Converter.TurnedState.ToBoolean(value));

            Tangent = new PropertyOfModel <Turned>(
                interiorModel.Tangent,
                (value) => viewModel.TangentValue = Converter.TurnedState.ToBoolean(value));

            Tone = new PropertyOfModel <Turned>(
                interiorModel.Tone,
                (value) => viewModel.ToneValue = Converter.TurnedState.ToBoolean(value));

            AntennaFixer = new PropertyOfModel <ClampState>(
                interiorModel.AntennaFixer,
                (value) => viewModel.AntennaFixerAngle = Converter.AntennaFixer.ToAngle(value));

            Range = new PropertyOfModel <RangeState>(
                interiorModel.Range,
                (value) => viewModel.RangeAngle = Converter.Range.ToAngle(value));

            WorkMode = new PropertyOfModel <WorkModeState>(
                interiorModel.WorkMode,
                (value) => viewModel.WorkModeAngle = Converter.WorkMode.ToAngle(value));

            Voltage = new PropertyOfModel <VoltageState>(
                interiorModel.Voltage,
                (value) => viewModel.VoltageAngle = Converter.Voltage.ToAngle(value));

            Clamps          = new ClampsSet(interiorModel, viewModel);
            SubFixFrequency = new SwitchesSet(interiorModel, viewModel);

            NumberSubFrequency = new GetPropertyOfModel <SubFrequencyState>(interiorModel.NumberSubFrequency);
        }
        public MainWindow()
        {
            _cx9020    = new Kommunikation.Cx9020();
            _viewModel = new ViewModel.ViewModel();


            InitializeComponent();
            DataContext = _viewModel;
        }
Exemplo n.º 14
0
        public static void TestSetup(TestContext testContext)
        {
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);

            SimpleIoc.Default.Register <IWindowService, WindowService>();
            SimpleIoc.Default.Register <IDialogCoordinator, DialogCoordinator>();
            SimpleIoc.Default.Register <ViewModel.ViewModel>();

            _viewModel = ServiceLocator.Current.GetInstance <ViewModel.ViewModel>();
        }
Exemplo n.º 15
0
 public HomePage()
 {
     this.InitializeComponent();
     LetLogoRotation();
     //hexagonStoryboard.Begin();
     View = new ViewModel.ViewModel();
     if (!APPDATA.app_data.Views.Contains(View))
     {
         APPDATA.app_data.Views.Add(View);
     }
 }
Exemplo n.º 16
0
        public void Setup()
        {
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);

            SimpleIoc.Default.Register <IWindowService, WindowService>();
            SimpleIoc.Default.Register <IDialogCoordinator, DialogCoordinator>();
            SimpleIoc.Default.Register <ILoggerFactory>(() => new LoggerFactory());
            SimpleIoc.Default.Register <ViewModel.ViewModel>();

            _viewModel = ServiceLocator.Current.GetInstance <ViewModel.ViewModel>();
        }
Exemplo n.º 17
0
 public BookingInfoCatalog(ViewModel.ViewModel vm)
 {
     ViewModel = vm;
     // fixed Room Type : S , D , F
     RoomType = new ObservableCollection <string>()
     {
         "D", "S", "F"
     };
     BookingInfo = new ObservableCollection <BookingInfo>();
     // Web API Uri link ..........................
     FetchAllData();
 }
        private readonly RentalManagementEntities db = new RentalManagementEntities();// GET: Reports

        public ActionResult Index()
        {
            var tables = new ViewModel.ViewModel
            {
                Jobs       = db.Jobs,
                Rentals    = db.Rentals,
                Vendors    = db.Vendors,
                Equipments = db.Equipments
            };

            return(View(tables));
        }
Exemplo n.º 19
0
        public LogWindow(int bags)
        {
            vm = new ViewModel.ViewModel();
            dispatcherTimer = new DispatcherTimer();

            bagsnr = bags;

            InitializeComponent();


            dispatcherTimer          = new System.Windows.Threading.DispatcherTimer();
            dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 500);
            dispatcherTimer.Start();
        }
Exemplo n.º 20
0
 public LineAndEllipseAnimation(InteriorModel Model, ViewModel.ViewModel ViewModel)
 {
     this.Model            = Model;
     this.ViewModel        = ViewModel;
     dispatcherOnAnimation = new DispatcherTimer
     {
         Interval = TimeSpan.FromMilliseconds(1000 / 40)
     };
     dispatcherOnAnimation.Tick += new EventHandler(OnAnimation_Tick);
     dispatcherOffAnimation      = new DispatcherTimer
     {
         Interval = TimeSpan.FromMilliseconds(1000 / 40)
     };
     dispatcherOffAnimation.Tick += new EventHandler(OffAnimation_Tick);
 }
Exemplo n.º 21
0
        private void InitializeViewModel()
        {
            viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };


            viewModel.Bars.Add(clipboardBar);
            MyCommand printCommand = new MyCommand(printVisa)
            {
                Caption    = "打印",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand setCommand = new MyCommand(setQZID)
            {
                Caption    = "设置签证号",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand saveQZIDCommand = new MyCommand(saveQZID)
            {
                Caption    = "保存签证号码",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand printTable4Command = new MyCommand(printTable4)
            {
                Caption    = "打印表四",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand showAllSendNoCommand = new MyCommand(showAllSendNo)
            {
                Caption    = "显示所有签证",
                LargeGlyph = null,
                SmallGlyph = null
            };


            clipboardBar.Commands.Add(printCommand);
            clipboardBar.Commands.Add(setCommand);
            clipboardBar.Commands.Add(saveQZIDCommand);
            clipboardBar.Commands.Add(printTable4Command);
            clipboardBar.Commands.Add(showAllSendNoCommand);
        }
Exemplo n.º 22
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel    = new ViewModel.ViewModel();
            BarModel            clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };


            viewModel.Bars.Add(clipboardBar);
            MyCommand newCommand = new MyCommand(newList)
            {
                Caption    = "新建报审名单",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand sendCommand = new MyCommand(SendList)
            {
                Caption    = "提交报审名单",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand exportCommand = new MyCommand(exportList)
            {
                Caption    = "生成excel表格",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand refreshCommand = new MyCommand(refreshList)
            {
                Caption    = "刷新",
                LargeGlyph = null,
                SmallGlyph = null
            };


            clipboardBar.Commands.Add(newCommand);
            clipboardBar.Commands.Add(sendCommand);
            clipboardBar.Commands.Add(exportCommand);
            clipboardBar.Commands.Add(refreshCommand);

            DataContext = viewModel;
        }
Exemplo n.º 23
0
        public ManConfigTesten(ViewModel.ViewModel viewModel)
        {
            _viewModel = viewModel;
            try
            {
                Einstellungen = JsonConvert.DeserializeObject <Einstellungen>(File.ReadAllText("Einstellungen.json"));
            }
            catch (Exception ex)
            {
                MessageBox.Show("Datei nicht gefunden: Einstellungen.json" + " --> " + ex);
            }

            _aaDateiListe = DateiListenEinlesen("AA.json");
            _aiDateiListe = DateiListenEinlesen("AI.json");
            _daDateiListe = DateiListenEinlesen("DA.json");
            _diDateiListe = DateiListenEinlesen("DI.json");
        }
        public Hydraulikaggregat(MainWindow mainWindow, ViewModel.ViewModel viewModel)
        {
            _mainWindow = mainWindow;
            _viewModel  = viewModel;

            Druck = 0;
            Pegel = 0.8;
            B3    = true;
            B4    = true;
            B5    = true;
            F1    = true;
            S2    = true;

            Stopwatch = new Stopwatch();
            Stopwatch.Restart();

            System.Threading.Tasks.Task.Run(HydraulikaggregatTask);
        }
Exemplo n.º 25
0
        public MainWindow()
        {
            InitializeComponent();
            var contrastWindow = new WindowMediator {
                CreateWindow = () => new ContrastAndBrightness()
            };
            var rotateWindow = new WindowMediator {
                CreateWindow = () => new RotateWindow()
            };
            var resizeWindow = new WindowMediator {
                CreateWindow = () => new ResizeWindow()
            };
            var filterWindow = new WindowMediator {
                CreateWindow = () => new FilterWindow()
            };

            DataContext = new ViewModel.ViewModel(contrastWindow, rotateWindow, resizeWindow, filterWindow);
        }
Exemplo n.º 26
0
        public static void OpenViewModel(ViewModel.ViewModel viewModel,
                                         object dataContext, double width = 640, double height = 480)
        {
            Window openedWindow = OpenedWindows.SingleOrDefault(window => window.Content.Equals(viewModel));

            if (openedWindow == null)
            {
                openedWindow = new Window {
                    Width = width, Height = height, Title = viewModel.Name, Content = viewModel, MinHeight = 450, MinWidth = 450
                };
                openedWindow.Closed += OpenedWindowClosed;
                OpenedWindows.Add(openedWindow);
                openedWindow.Show();
                openedWindow.DataContext = dataContext;
            }
            else
            {
                openedWindow.Activate();
            }
        }
        public MainPage()
        {
            this.InitializeComponent();
            this.SizeChanged += (a, b) =>
            {
                ApplicationViewState d = ApplicationView.Value;
                VisualStateManager.GoToState(this, d.ToString(), false);
            };

            //Student n = new Student
            //    {
            //        Name = "praba",
            //        Course = "mse"
            //    };
            //grid1.DataContext = n;
            MVVM.ViewModel.ViewModel viewModel = new ViewModel.ViewModel();

            viewModel.PropertyChanged += StudentPropertyChanged;
            grid1.DataContext          = viewModel;
        }
Exemplo n.º 28
0
        //void InitmenuList()
        //{
        //    menuList = visaORM.TB_Menu.Where(m=>m.FStatus==true).ToList();
        //}


        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel    = new ViewModel.ViewModel();
            BarModel            clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };

            viewModel.Bars.Add(clipboardBar);


            MyCommand addCommand = new MyCommand(UserAdd)
            {
                Caption    = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(UserDel)
            {
                Caption    = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(UserSave)
            {
                Caption    = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };

            if (MainContext.UserCompanyName.ToUpper() == "ADMIN")
            {
                clipboardBar.Commands.Add(addCommand);
                clipboardBar.Commands.Add(delCommand);
            }
            clipboardBar.Commands.Add(saveCommand);
            DataContext = viewModel;
        }
Exemplo n.º 29
0
        public MainWindow(bool noshaders = false, bool noaero = false, string[] files = null, string[] folders = null)
        {
            _noShaders = noshaders;
            _noAero    = noaero;

            VModel = new ViewModel.ViewModel(this);
            var folder = new FolderWrapper(removable: false)
            {
                Name = Properties.Resources.OutputFolder
            };

            VModel.Folders.Add(folder);

            if (files != null)
            {
                VModel.ImportFiles(this, files, folder);
            }

            if (folders != null)
            {
                foreach (var s in folders)
                {
                    folder.Files.Add(new FolderWrapper(s));
                }
            }


            InitializeComponent();

            //this.DataContext = vModel;

            _watermarkFontDlg.Font = VModel.WatermarkFont;

            Handle = new WindowInteropHelper(this).Handle;

#if !DEBUG
            GcBtn.Visibility = Visibility.Collapsed;
#endif
        }
Exemplo n.º 30
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel    = new ViewModel.ViewModel();
            BarModel            clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };


            viewModel.Bars.Add(clipboardBar);
            MyCommand newCommand = new MyCommand(auditList)
            {
                Caption    = "审核签证",
                LargeGlyph = null,
                SmallGlyph = null
            };


            clipboardBar.Commands.Add(newCommand);

            DataContext = viewModel;
        }
Exemplo n.º 31
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel    = new ViewModel.ViewModel();
            BarModel            clipboardBar = new BarModel()
            {
                Name = "工具栏"
            };


            viewModel.Bars.Add(clipboardBar);

            MyCommand addCommand = new MyCommand(NewModel)
            {
                Caption    = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(DelModel)
            {
                Caption    = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(SaveModel)
            {
                Caption    = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };


            clipboardBar.Commands.Add(addCommand);
            clipboardBar.Commands.Add(delCommand);
            clipboardBar.Commands.Add(saveCommand);

            DataContext = viewModel;
        }
Exemplo n.º 32
0
 public MainWindow()
 {
     InitializeComponent();
     viewModel = DataContext as ViewModel.ViewModel;
 }
Exemplo n.º 33
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);

            MyCommand addCommand = new MyCommand(NewModel)
            {
                Caption = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(DelModel)
            {
                Caption = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(SaveModel)
            {
                Caption = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(addCommand);
            clipboardBar.Commands.Add(delCommand);
            clipboardBar.Commands.Add(saveCommand);

            DataContext = viewModel;
        }
Exemplo n.º 34
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);
            MyCommand prevCommand = new MyCommand(CustomerPrev)
            {
                Caption = "上一份",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand nextCommand = new MyCommand(CustomerNext)
            {
                Caption = "下一份",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand addCommand = new MyCommand(CustomerAdd)
            {
                Caption = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(CustomerDel)
            {
                Caption = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(CustomerSave)
            {
                Caption = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };

            //MyCommand copyCommand = new MyCommand(null) { Caption = "Copy", LargeGlyph = GlyphHelper.GetGlyph("/Images/Icons/Copy_32x32.png"), SmallGlyph = GlyphHelper.GetGlyph("/Images/Icons/Copy_16x16.png") };

            clipboardBar.Commands.Add(prevCommand);
            clipboardBar.Commands.Add(nextCommand);
            clipboardBar.Commands.Add(addCommand);
            clipboardBar.Commands.Add(delCommand);
            clipboardBar.Commands.Add(saveCommand);

            //MyGroupCommand addGroupCommand = new MyGroupCommand() { Caption = "Add", LargeGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_32x32.png"), SmallGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_16x16.png") };
            //MyParentCommand parentCommand = new MyParentCommand(viewModel, MyParentCommandType.CommandCreation) { Caption = "Add Command", LargeGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_32x32.png"), SmallGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_16x16.png") };
            //MyParentCommand parentBar = new MyParentCommand(viewModel, MyParentCommandType.BarCreation) { Caption = "Add Bar", LargeGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_32x32.png"), SmallGlyph = GlyphHelper.GetGlyph("/Images/Icons/Add_16x16.png") };
            //addGroupCommand.Commands.Add(parentCommand);
            //addGroupCommand.Commands.Add(parentBar);
            //addingBar.Commands.Add(addGroupCommand);
            //addingBar.Commands.Add(parentCommand);
            //addingBar.Commands.Add(parentBar);

            DataContext = viewModel;
        }
Exemplo n.º 35
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);

            MyCommand exportCommand = new MyCommand(exportList)
            {
                Caption = "生成excel表格",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(exportCommand);

            DataContext = viewModel;
        }
Exemplo n.º 36
0
        private void InitializeViewModel()
        {
            viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);
            MyCommand printCommand = new MyCommand(printVisa)
            {
                Caption = "打印",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand setCommand = new MyCommand(setQZID)
            {
                Caption = "设置签证号",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand saveQZIDCommand = new MyCommand(saveQZID)
            {
                Caption = "保存签证号码",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand printTable4Command = new MyCommand(printTable4)
            {
                Caption = "打印表四",
                LargeGlyph = null,
                SmallGlyph = null
            };
            MyCommand showAllSendNoCommand = new MyCommand(showAllSendNo)
            {
                Caption = "显示所有签证",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(printCommand);
            clipboardBar.Commands.Add(setCommand);
            clipboardBar.Commands.Add(saveQZIDCommand);
            clipboardBar.Commands.Add(printTable4Command);
            clipboardBar.Commands.Add(showAllSendNoCommand);
        }
Exemplo n.º 37
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);
            MyCommand prevCommand = new MyCommand(submitVisa)
            {
                Caption = "提交签证申请",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand printCommand = new MyCommand(printVisa)
            {
                Caption = "打印名单号签证列表(表1)",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand refreshCommand = new MyCommand(refreshSubmit)
            {
                Caption = "刷新",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(prevCommand);
            clipboardBar.Commands.Add(printCommand);
            clipboardBar.Commands.Add(refreshCommand);

            DataContext = viewModel;
        }
Exemplo n.º 38
0
        //void InitmenuList()
        //{
        //    menuList = visaORM.TB_Menu.Where(m=>m.FStatus==true).ToList();
        //}
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);

            MyCommand addCommand = new MyCommand(UserAdd)
            {
                Caption = "新增",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand delCommand = new MyCommand(UserDel)
            {
                Caption = "删除",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand saveCommand = new MyCommand(UserSave)
            {
                Caption = "保存",
                LargeGlyph = null,
                SmallGlyph = null
            };

            if (MainContext.UserCompanyName.ToUpper() == "ADMIN")
            {
            clipboardBar.Commands.Add(addCommand);
            clipboardBar.Commands.Add(delCommand);
            }
            clipboardBar.Commands.Add(saveCommand);
            DataContext = viewModel;
        }
Exemplo n.º 39
0
        private void InitializeViewModel()
        {
            ViewModel.ViewModel viewModel = new ViewModel.ViewModel();
            BarModel clipboardBar = new BarModel() { Name = "工具栏" };

            viewModel.Bars.Add(clipboardBar);
            MyCommand newCommand = new MyCommand(newList)
            {
                Caption = "新建报审名单",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand sendCommand = new MyCommand(SendList)
            {
                Caption = "提交报审名单",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand exportCommand = new MyCommand(exportList)
            {
                Caption = "生成excel表格",
                LargeGlyph = null,
                SmallGlyph = null
            };

            MyCommand refreshCommand = new MyCommand(refreshList)
            {
                Caption = "刷新",
                LargeGlyph = null,
                SmallGlyph = null
            };

            clipboardBar.Commands.Add(newCommand);
            clipboardBar.Commands.Add(sendCommand);
            clipboardBar.Commands.Add(exportCommand);
            clipboardBar.Commands.Add(refreshCommand);

            DataContext = viewModel;
        }