Esempio n. 1
0
 public CertPicker(IConfigProxy proxy,IHeadQuarterProxy hqProxy)
 {
     InitializeComponent();
     VM = new CertPickerViewModel(proxy,hqProxy);
     VM.View = this;
     this.DataContext = VM;
 }
Esempio n. 2
0
        public ExportWizard(IKeyProxy keyProxy, IConfigProxy configProxy, IHeadQuarterProxy hqProxy, ISubsidiaryProxy ssProxy)
        {
            VM = new ExportKeysViewModel(keyProxy, configProxy, hqProxy,ssProxy);
            VM.View = this;

            VM.StepPages.Add(new TypeSelectPageView(VM));
            InitViewModel(VM);
        }
Esempio n. 3
0
 public ImportKeysViewModel(IKeyProxy keyProxy, ISubsidiaryProxy ssProxy, IConfigProxy configProxy, IHeadQuarterProxy hqProxy)
     : base(keyProxy)
 {
     this.ssProxy = ssProxy;
     this.headquarterProxy = hqProxy;
     this.configProxy = configProxy;
     base.WindowTitle = MergedResources.Import_WinTit;
     InitializeCollections();
     InitRbEnable();
 }
Esempio n. 4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="configProxy"></param>
 /// <param name="ssProxy"></param>
 /// <param name="hqProxy"></param>
 /// <param name="userProxy"></param>
 /// <param name="stockProxy"></param>
 /// <param name="keyProxy"></param>
 public ConfigurationView(IConfigProxy configProxy, ISubsidiaryProxy ssProxy, IHeadQuarterProxy hqProxy,
     IUserProxy userProxy, IKeyTypeConfigurationProxy stockProxy, IKeyProxy keyProxy, int? pageIndex)
 {
     InitializeComponent();
     this.reSizeWnd();
     VM = new ConfigurationViewModel(configProxy,ssProxy,hqProxy,userProxy,stockProxy,keyProxy,pageIndex);
     VM.View = this;
     DataContext = VM;
     Closed += this.ConfigurationView_Closed;
 }
Esempio n. 5
0
 public CertPickerViewModel(IConfigProxy proxyParam, IHeadQuarterProxy hqProxyParam)
 {
     if (proxy == null)
         proxy = new ConfigProxy(KmtConstants.LoginUser);
     else
         proxy = proxyParam;
     if (hqProxyParam == null)
         hqProxy = new HeadQuarterProxy();
     else
         hqProxy = hqProxyParam;
     this.LoadCerts();
 }
Esempio n. 6
0
        public SystemSettingViewModel(IConfigProxy configProxy, IHeadQuarterProxy hqProxy)
        {
            this.configProxy = configProxy;
            this.hqProxy = hqProxy;

            if (KmtConstants.IsFactoryFloor)
                this.IsMsServiceVisible = Visibility.Collapsed;
            else if (KmtConstants.IsTpiCorp && (KmtConstants.CurrentHeadQuarter != null && KmtConstants.CurrentHeadQuarter.IsCentralizedMode == true))
                this.IsMsServiceVisible = Visibility.Collapsed;
            else
                this.IsMsServiceVisible = Visibility.Visible;
            LoadConfigurations();
            IsSaved = true;
        }
Esempio n. 7
0
        public DisMembershipProvider(ISubsidiaryProxy ssProxy, IHeadQuarterProxy hqProxy)
        {
            callDirectionExtractor = new CallDirectionExtractor();

            if (ssProxy == null)
                this.ssProxy = new SubsidiaryProxy();
            else
                this.ssProxy = ssProxy;

            if (hqProxy == null)
                this.hqProxy = new HeadQuarterProxy();
            else
                this.hqProxy = hqProxy;
        }
Esempio n. 8
0
        public KeyManagement(MainWindowViewModel mainVm, IKeyProxy keyProxy, IConfigProxy configProxy,
            ISubsidiaryProxy ssProxy, IHeadQuarterProxy hqProxy)
        {
            InitializeComponent();
            VM = new KeyManagementViewModel(keyProxy, configProxy, ssProxy, hqProxy);
            DataContext = VM;
            mainVm.GetKeys += new EventHandler((s, e) => VM.GetKeys());
            mainVm.RefreshKeys += new EventHandler((s, e) => VM.Refresh());
            mainVm.RefreshSubsidiaries += new EventHandler((s, e) => VM.LoadSubSidiary());

            if (KmtConstants.IsFactoryFloor)
            {
                grdKeyList.Columns[9].Visibility = System.Windows.Visibility.Collapsed;
            }
        }
Esempio n. 9
0
 public ConfigurationViewModel(IConfigProxy configProxyParam, ISubsidiaryProxy ssProxyParam, IHeadQuarterProxy hqProxyParam,
     IUserProxy userProxyParam, IKeyTypeConfigurationProxy stockProxyParam, IKeyProxy keyProxyParam, int? pageIndex)
 {
     ssProxy = ssProxyParam ?? new SubsidiaryProxy();
     configProxy = configProxyParam ?? new ConfigProxy(KmtConstants.LoginUser);
     userProxy = userProxyParam ?? new UserProxy();
     hqProxy = hqProxyParam ?? new HeadQuarterProxy();
     stockProxy = stockProxyParam ?? new KeyTypeConfigurationProxy();
     keyProxy = keyProxyParam ?? new KeyProxy(KmtConstants.LoginUser, KmtConstants.HeadQuarterId);
     this.LoadPages();
     if (pageIndex != null && pageIndex < ConfigPages.Count)
         this.SelectedConfigPage = ConfigPages.ElementAt(pageIndex.Value);
     else
         this.SelectedConfigPage = ConfigPages.ElementAt(0);
 }
        /// <summary>
        /// public constrcutor
        /// </summary>
        /// <param name="dispatcher">Dispatcher instance to send updates to DIS.Presentation.KMT. This should be passed null from automated unit tests.</param>
        public HeadQuarterEditorViewModel(HeadQuarter hq, IHeadQuarterProxy headQuarterProxy)
        {
            if (headQuarterProxy == null)
                this.headQuarterProxy = new HeadQuarterProxy();
            else
                this.headQuarterProxy = headQuarterProxy;

            if (hq == null)
            {
                HeadQuarter = new HeadQuarter();
                EditMode = false;
                Title = Resources.CreateHeadQuarterViewModel_Title_New;//later
                HeadContent = Resources.CreateHeadQuarterViewModel_HeadContent_Add;//later
            }
            else
            {
                HeadQuarter = hq;
                EditMode = true;
                Title = Resources.CreateHeadQuarterViewModel_Title_Edit;
                HeadContent = Resources.CreateHeadQuarterViewModel_HeadContent_Edit;
            }
            InitializeCollections(HeadQuarter);
        }
Esempio n. 11
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="mainFrame"></param>
        /// <param name="configProxy"></param>
        /// <param name="keyProxy"></param>
        /// <param name="userProxy"></param>
        /// <param name="logProxy"></param>
        /// <param name="ssProxy"></param>
        /// <param name="hqProxy"></param>
        /// <param name="stockProxy"></param>
        public MainWindowViewModel(Frame mainFrame, IConfigProxy configProxy, IKeyProxy keyProxy, IUserProxy userProxy,
            ILogProxy logProxy, ISubsidiaryProxy ssProxy, IHeadQuarterProxy hqProxy, IKeyTypeConfigurationProxy stockProxy)
        {
            this.configProxy = configProxy ?? new ConfigProxy(KmtConstants.LoginUser);
            this.keyProxy = keyProxy ?? new KeyProxy(KmtConstants.LoginUser, KmtConstants.HeadQuarterId);
            this.userProxy = userProxy ?? new UserProxy();
            this.logProxy = logProxy ?? new LogProxy();
            this.ssProxy = ssProxy ?? new SubsidiaryProxy();
            this.hqProxy = hqProxy ?? new HeadQuarterProxy();
            this.stockProxy = stockProxy ?? new KeyTypeConfigurationProxy();

            this.mainFrame = mainFrame;
            keyManagement = new KeyManagement(this, this.keyProxy, this.configProxy, this.ssProxy, this.hqProxy);
            userManagement = new UserManagement(this, this.userProxy);
            logViewer = new ViewLogs(this, this.logProxy);
            InitializeNotificationSystem();

            RibbonTabIndex = KeyPageIndex;
            InitializeRoles();
            LogTypes.Add(MergedResources.Common_SystemLog);
            LogTypes.Add(MergedResources.Common_OperationLog);
            OnCurrentUserRoleChanged();
            OnAutoReportChanged(null, null);
        }
Esempio n. 12
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="configProxy"></param>
 /// <param name="hqProxy"></param>
 public SystemSettingView(IConfigProxy configProxy, IHeadQuarterProxy hqProxy)
 {
     InitializeComponent();
     VM = new SystemSettingViewModel(configProxy, hqProxy);
     DataContext = VM;
 }
Esempio n. 13
0
 public ExportKeysViewModel(IKeyProxy keyProxy, IConfigProxy configProxy, IHeadQuarterProxy hqProxy, ISubsidiaryProxy ssProxy)
     : base(keyProxy)
 {
     this.subProxy = ssProxy;
     this.headquarterProxy = hqProxy;
     this.configProxy = configProxy;
     base.WindowTitle = MergedResources.Export_WinTit;
     if (ReturnKeysListModelVM == null)
         ReturnKeysListModelVM = new ReturnKeysListViewModel();
     InitializeCollections();
     InitKeystates();
     InitRbEnable();
     if (ExportTypeChanged != null)
         ExportTypeChanged(this, new EventArgs());
 }
Esempio n. 14
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="keyProxy"></param>
        /// <param name="configProxy"></param>
        /// <param name="ssProxy"></param>
        /// <param name="hqProxy"></param>
        public KeyManagementViewModel(IKeyProxy keyProxy, IConfigProxy configProxy,
            ISubsidiaryProxy ssProxy, IHeadQuarterProxy hqProxy)
        {
            this.keyProxy = keyProxy;
            this.configProxy = configProxy;
            this.ssProxy = ssProxy;
            this.hqProxy = hqProxy;

            WorkInBackground((s, e) =>
            {
                LoadKeyStatesList();
                LoadSubSidiary();
                LoadKeyTypesList();
                LoadKeyRetuernState();
            });
        }
Esempio n. 15
0
 public UpLevelSystemViewModel(IHeadQuarterProxy headQuarter)
 {
     this.headQuarterProxy = headQuarter;
     LoadHeadQuarters();
     IsSaved = true;
 }