コード例 #1
0
 public MasterPreViewModel(IMaster widget)
 {
     //Infra Structure
     _model = new MasterModel(widget, true);
     //IsImgConvertType = false;
     (_model as MasterModel).LoadAllChildrenWidgets();
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IMaster master = this.Master as IMaster;

            master.setHeaderBtnBack(false);
            master.setRefreshCountBtn(true);
        }
コード例 #3
0
        public VisualTable(string name, IMaster master)
        {
            this.Text       = "";
            this.Click     += new EventHandler(VisualTable_Click);
            this.MouseDown += new MouseEventHandler(VisualTable_MouseDown);
            this.MouseUp   += new MouseEventHandler(VisualTable_MouseUp);
            this.MouseMove += new MouseEventHandler(VisualTable_MouseMove);

            _masterUIControl = master;

            _lblName          = new Label();
            _lblName.Location = new Point(5, 10);
            _lblName.Click   += new EventHandler(objName_Click);

            _txtName              = new TextBox();
            _txtName.Location     = new Point(5, 15);
            _txtName.Width        = this.Width - 20;
            _txtName.Visible      = false;
            _txtName.KeyUp       += new KeyEventHandler(txtName_KeyUp);
            _txtName.TextChanged += new EventHandler(_txtName_TextChanged);

            this.ObjectName = name;

            _tablenameAssist.KeyUp += new KeyEventHandler(tablenameAssist_KeyUp);
            _tablenameAssist.Click += new EventHandler(_tablenameAssist_Click);
            _tablenameAssist.Hide();

            this.Controls.Add(_lblName);
            this.Controls.Add(_txtName);
            this._masterUIControl.getMasterUIControl().Controls.Add(_tablenameAssist);
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CommonController" /> class.
 /// </summary>
 /// <param name="_iMaster">The i common.</param>
 /// <param name="_iProductCategoryType">Type of the i product category.</param>
 /// <param name="_iUser">The i user.</param>
 /// <param name="_iSize">Size of the i.</param>
 public MasterController(IMaster _iMaster, IProductCategoryType _iProductCategoryType, IUser _iUser, ISize _iSize)
 {
     iMaster = _iMaster;
     iProductCategoryType = _iProductCategoryType;
     iUser = _iUser;
     iSize = _iSize;
 }
コード例 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="master"></param>
 /// <param name="registers"></param>
 /// <param name="configuration"></param>
 /// <param name="logger"></param>
 public ModbusBridge(IMaster master, RegistersConfiguration registers, ConnectorConfiguration configuration, ILogger logger)
 {
     _logger        = logger;
     _master        = master;
     _registers     = registers;
     _configuration = configuration;
 }
コード例 #6
0
ファイル: MasterDataHelper.cs プロジェクト: cloverspd1/ICDM
        /// <summary>
        /// Gets the master data of.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="web">The web.</param>
        /// <param name="master">The master.</param>
        /// <returns>
        /// master object
        /// </returns>
        private IMaster GetMasterDataOf(ClientContext context, Web web, IMaster master)
        {
            dynamic objMaster = Convert.ChangeType(master, master.GetType());
            string  listName  = Convert.ToString(((PropertyInfo)objMaster.GetType().GetProperty("ListName")).GetValue(objMaster));

            objMaster = GlobalCachingProvider.Instance.GetItem(listName, false) as IMaster;
            if (objMaster == null)
            {
                objMaster = Convert.ChangeType(master, master.GetType());
                string         scope      = Convert.ToString(((PropertyInfo)objMaster.GetType().GetProperty("Scope")).GetValue(objMaster));
                Type           itemType   = ((PropertyInfo)objMaster.GetType().GetProperty("ItemType")).GetValue(objMaster);
                PropertyInfo[] properties = itemType.GetProperties();
                string         viewFields = this.GetViewFields(properties);
                if (scope.Equals(ListScope.GLOBAL))
                {
                    string siteURL = GetSiteURL(SiteURLs.ROOTSITEURL); //this.GetConfigVariable(SiteURLs.ROOTSITEURL);
                    context = this.CreateClientContext(siteURL);
                    web     = this.CreateWeb(context);
                }
                List      spList = web.Lists.GetByTitle(listName);
                CamlQuery qry    = new CamlQuery();
                qry.ViewXml = @"<View><Query></Query>" + viewFields + "</View>";
                ListItemCollection items = spList.GetItems(CamlQuery.CreateAllItemsQuery());
                context.Load(items);
                context.ExecuteQuery();
                objMaster = this.AssignPropertyValues(objMaster, context, web, items, itemType);
                GlobalCachingProvider.Instance.AddItem(listName, objMaster);
            }

            return(objMaster);
        }
コード例 #7
0
        public MasterModel(IMaster master)
        {
            _master = master;
            IDocumentService doc = ServiceLocator.Current.GetInstance <IDocumentService>();

            _document = doc.Document;
            _style    = master.MasterStyle;
        }
コード例 #8
0
 private static SerialMaster CreateSerialMaster(IMaster wdg)
 {
     if (wdg == null)
     {
         return(null);
     }
     return(new SerialMaster(wdg));
 }
コード例 #9
0
ファイル: NestedInterfacesTest.cs プロジェクト: ywscr/config
        public NestedInterfacesTest()
        {
            _store = new DictionaryConfigStore();

            _config = new ConfigurationBuilder <IMaster>()
                      .UseConfigStore(_store)
                      .Build();
        }
コード例 #10
0
ファイル: JsMasterStyle.cs プロジェクト: naver/protonow
 public JsMasterStyle(IMaster master, IMasterStyle masterStyle, IPageView pageView, bool bIsSetMD5, Guid AdaptiviewID)
 {
     _master        = master;
     _masterStyle   = masterStyle;
     _pageView      = pageView;
     IsSetMD5       = bIsSetMD5;
     _childPageView = _master.MasterPage.PageViews[AdaptiviewID];
 }
コード例 #11
0
        private void btnHeader_Click(object sender, RoutedEventArgs e)
        {
            gdChild.Children.Clear();
            AccountsUC ac = new AccountsUC();

            _imaster = ac;
            gdChild.Children.Add(ac);
        }
コード例 #12
0
 public ClientTCP(string ip, int port, IMaster callback)
 {
     _endpoint = new IPEndPoint(IPAddress.Parse(ip), port);
     _callback = callback;
     _disposed = false;
     _synlock  = new object();
     _sock     = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
 }
コード例 #13
0
        private void btnRegistration_Click(object sender, RoutedEventArgs e)
        {
            gdChild.Children.Clear();
            RegUI rg = new RegUI();

            _imaster = rg;
            gdChild.Children.Add(rg);
        }
コード例 #14
0
        private void btnVehicle_Click(object sender, RoutedEventArgs e)
        {
            gdChild.Children.Clear();
            Vehicle v = new Vehicle();

            _imaster = v;
            gdChild.Children.Add(v);
        }
コード例 #15
0
 public static bool OpenHelp(this IMaster proc)
 {
     if (proc == null)
     {
         return(false);
     }
     Process.Start(proc.HelpUrl);
     return(true);
 }
コード例 #16
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="baseUiControl">visualTable 執行的環境</param>
        /// <param name="master">資料提供者</param>
        public VisualTableManager(Control baseUiControl, IMaster master)
        {
            _uiControl = baseUiControl;
            _master    = master;

            VisualTable box = makeVisualTable(master);

            box.Location = new Point(30, 30);
        }
コード例 #17
0
        public MasterForm(IMaster master, IMeasurementCache cache, String alias)
        {
            InitializeComponent();

            this.master = master;
            this.cache  = cache;

            this.Text = String.Format("DNP3 Master ({0})", alias);
        }
コード例 #18
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        //Add items to session
        //....

        //Now refresh the updatepanel on the masterpage
        IMaster masterPage = Master as IMaster;

        masterPage.RefreshPanel();
    }
コード例 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IMaster master = this.Master as IMaster;

            master.setHeaderBtnVisible(false);

            //master.setRefreshFavouriteBtn(true);

            BindData();
        }
コード例 #20
0
        public MasterNode(MeasurementCache cache, IMaster master, ISimulatorNodeCallbacks callbacks, string alias)
        {
            this.cache     = cache;
            this.master    = master;
            this.callbacks = callbacks;
            this.alias     = alias;

            this.callbacks.ChangeImage(IconIndex.Master);

            this.openAction = new NodeAction("Open", () => OpenForm());
        }
コード例 #21
0
        private VisualTable makeVisualTable(IMaster master)
        {
            Control     baseUiControl = master.getMasterUIControl();
            VisualTable box           = new VisualTable("unknown", master);

            baseUiControl.Controls.Add(box);

            baseUiControl.MouseUp += new MouseEventHandler(baseUiControl_MouseUp);

            return(box);
        }
コード例 #22
0
        public MasterNode(MeasurementCache cache, IMaster master, ISimulatorNodeCallbacks callbacks, string alias)
        {
            this.cache = cache;
            this.master = master;
            this.callbacks = callbacks;
            this.alias = alias;

            this.callbacks.ChangeImage(IconIndex.Master);

            this.openAction = new NodeAction("Open", () => OpenForm());
        }
コード例 #23
0
 /// <summary>
 /// Initializes a new instance of <see cref="Connector"/>
 /// </summary>
 /// <param name="registers">The <see cref="RegistersConfiguration">configured registers</see></param>
 /// <param name="configuration"><see cref="ConnectorConfiguration">Configuration</see></param>
 /// <param name="master">The <see cref="IMaster"/></param>
 /// <param name="logger"><see cref="ILogger"/> for logging</param>
 public Connector(
     RegistersConfiguration registers,
     ConnectorConfiguration configuration,
     IMaster master,
     ILogger logger)
 {
     _registers     = registers;
     _configuration = configuration;
     _logger        = logger;
     _master        = master;
 }
コード例 #24
0
    public static IWriterStrategy GetStrategy(IMaster thing)
    {
        switch (thing)
        {
        case IA ia:
            return(new WriterA(ia));

        case IB ib:
            return(new WriterB(ib));
        }
        throw new Exception("Strategy not found!");
    }
コード例 #25
0
        public void MultipleBindingTest()
        {
            container.AutoBinding(Profiles.PROFILE_A);

            Master   selfBindingInstance       = container.Get <Master>();
            IMaster  interface1BindingInstance = container.Get <IMaster>();
            IMaster2 interface2BindingInstance = container.Get <IMaster2>();

            Assert.IsInstanceOfType(selfBindingInstance, typeof(Master));
            Assert.IsInstanceOfType(interface1BindingInstance, typeof(Master));
            Assert.IsInstanceOfType(interface2BindingInstance, typeof(Master));
        }
コード例 #26
0
        /// <summary>
        /// Creates Tcp channel, and gets a reference to master server
        /// </summary>
        /// <returns> a predicate confirming the sucess of the operations</returns>
        public static bool Init()
        {
            Logger.Log(new String[] { "Library", "init", "\r\n" });
            IDictionary props = new Hashtable();

            props["retryCount"] = 5;
            props["timeout"]    = 30000; // in milliseconds
            channel             = new TcpChannel(props, null, null);
            ChannelServices.RegisterChannel(channel, false);
            masterServer = (IMaster)Activator.GetObject(typeof(IMaster), "tcp://localhost:8086/MasterServer");
            return(true);
        }
コード例 #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IMaster master = this.Master as IMaster;

            master.setHeaderBtnVisible(false);
            //master.setRefreshNoticeBtn(true);

            if (!IsPostBack)
            {
                BindData();
            }
        }
コード例 #28
0
        public static void RunInterfaces2()
        {
            Slave slave = new Slave();

            // slave.P
            slave.III();
            IMaster master = slave;

            master.Power();
            //master.Freedom();
            ((IMaster)slave).Freedom();
        }
コード例 #29
0
        public MasterForm(IMaster master, IMeasurementCache cache, String alias)
        {
            InitializeComponent();

            this.master = master;
            this.cache = cache;

            this.Text = String.Format("DNP3 Master ({0})", alias);

            this.masterScanControl1.Master = master;

            this.comboBoxFunctionCode.DataSource = Enum.GetValues(typeof(FunctionCode));
        }
コード例 #30
0
ファイル: ClientService.cs プロジェクト: rootn3rd/ipc
        public void ConnectToChannel(string clientName)
        {
            _clientName = clientName;

            string address = Constants.EndPointAddress;

            NetNamedPipeBinding binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
            EndpointAddress     ep      = new EndpointAddress(address);

            _connection = ChannelFactory <IMaster> .CreateChannel(binding, ep);

            Console.WriteLine("Client Connected");
        }
コード例 #31
0
ファイル: MasterForm.cs プロジェクト: twanchai/dnp3-simulator
        public MasterForm(IMaster master, IMeasurementCache cache, String alias)
        {
            InitializeComponent();

            this.master = master;
            this.cache  = cache;

            this.Text = String.Format("DNP3 Master ({0})", alias);

            this.masterScanControl1.Master = master;

            this.comboBoxFunctionCode.DataSource = Enum.GetValues(typeof(FunctionCode));
        }
コード例 #32
0
        public override void Run()
        {
            var masterStack = new MasterStackConfig();

            masterStack.link.localAddr  = 1;
            masterStack.link.remoteAddr = 10;

            master = GetMaster(masterStack);

            var integrityPoll = master.AddClassScan(ClassField.AllEventClasses, TimeSpan.FromMilliseconds(500), TaskConfig.Default);

            master.Enable();
        }
コード例 #33
0
ファイル: PadInt.cs プロジェクト: paulortm/PADI-DSTM
 public void setMaster(IMaster m)
 {
     this.master = m;
 }
コード例 #34
0
 public MasterService(String masterUrl)
 {
     masterEndPoint = masterUrl;
     master = (IMaster)Activator.GetObject(typeof(IMaster), masterEndPoint);
 }
コード例 #35
0
ファイル: OutstationWrapper.cs プロジェクト: robrhce/Tulip
 // TODO: poor implementation
 //public List<IndexedValue<Analog>> NewAnalogs = new List<IndexedValue<Analog>>();
 //public List<IndexedValue<Binary>> NewBinaries = new List<IndexedValue<Binary>>();
 public OutstationWrapper(Outstation Model, IMaster Master)
 {
     this.Model = Model;
     this.Master = Master;
 }
コード例 #36
0
ファイル: DataServer.cs プロジェクト: paulortm/PADI-DSTM
 public DataServer(IMaster master, String serverUrl)
 {
     this.serverUrl = serverUrl;
     this.masterServer = master;
 }
コード例 #37
0
ファイル: Library.cs プロジェクト: paulortm/PADI-DSTM
        public static bool Init()
        {
            TcpChannel channel = new TcpChannel();
            ChannelServices.RegisterChannel(channel, true);

            PadiDstm.master = (IMaster)Activator.GetObject(typeof(IMaster), Constants.MASTER_SERVER_URL);

            PadiDstm.inited = true;

            return true;
        }
コード例 #38
0
 public LookupService(MasterService masterEndpointService)
 {
     masterService = masterEndpointService;
     master = masterService.Master;
 }
コード例 #39
0
ファイル: Program.cs プロジェクト: SmartyEngine/DI_and_IoC
 public Slave(IMaster master)
 {
     chief = master;
 }