public override void Assign(BaseView v, bool copyEvents) { var xafGridView = ((XpandXafGridView)v); Window = xafGridView.Window; MasterFrame = xafGridView.MasterFrame; Events.AddHandler(instanceCreated, xafGridView.Events[instanceCreated]); base.Assign(v, copyEvents); }
public override BaseBuildingController RregisterView(BaseView view) { if (_BuildingView == null && view is WarehouseView) { _BuildingView = view; } return base.RregisterView(view); }
static public void DettachFromView(BaseView view) { view.DocumentDeactivated -= deactivateHandler; view.DocumentActivated -= activateHandler; view.DocumentAdded -= addedHandler; view.DocumentDeactivated -= deactivatedHandler; view.DocumentRemoved -= removedHandler; view.DocumentClosing -= closingHandler; view.CustomDocumentsHostWindow -= customDocumentsHandler; }
static public void AttachToView(BaseView view) { view.DocumentDeactivated += deactivateHandler; view.DocumentActivated += activateHandler; view.DocumentAdded += addedHandler; view.DocumentDeactivated += deactivatedHandler; view.DocumentRemoved += removedHandler; view.DocumentClosing += closingHandler; view.CustomDocumentsHostWindow += customDocumentsHandler; }
/// <summary> /// Constructor /// </summary> /// <param name="baseView"></param> /// <param name="appointment"></param> public AppointmentView(BaseView baseView, Appointment appointment) { _BaseView = baseView; _Appointment = appointment; MouseUpNotification = true; StartTime = appointment.StartTime; EndTime = appointment.EndTime; ModelItem = appointment; IsRecurring = (appointment.IsRecurringInstance == true || appointment.Recurrence != null); RootItem = (appointment.IsRecurringInstance == true) ? appointment.RootAppointment : appointment; StartTimeChanged += AppointmentView_StartTimeChanged; EndTimeChanged += AppointmentView_EndTimeChanged; }
public GridHandler(BaseView prm_objBaseView) { _objGV = prm_objBaseView as GridView; }
//Aca setearias el view de base, asi despues al hacer herencia esto ya esta hecho public BaseState(BaseView view) { _view = view; }
public CustomScrollInfo(BaseView view) : base(view) { }
public void SetView(BaseView view) { this.view = view as BaseWindowView; }
public override BaseViewPainter CreatePainter(BaseView view) { return new CustomGridPainter(view as DevExpress.XtraGrid.Views.Grid.GridView); }
private async void SignIn() { Mvx.Resolve <IMvxMessenger>().Publish(new ProgressMessage(this, true)); //validate email and password var toValidate = new string[] { Email, Password }; SignInValidator validator = new SignInValidator(); ValidationResult results = validator.Validate(toValidate); if (results.IsValid) { //sign in if (BaseView != null && BaseView.CheckInternetConnection()) { Mvx.Resolve <IMvxMessenger>().Publish(new ProgressMessage(this, true)); //login first var loginResult = await mApiService.Login(Email, Password, Mvx.Resolve <IPlatformService>().OS == OS.Touch?AppConstants.iOSToken : AppConstants.AndroidToken); if (loginResult != null) { //#region exception //if (loginResult.Result == null) //{ // mCacheService.SessionId = loginResult.SessionId; // mCacheService.CurrentUser = new User(Email, Password); // mCacheService.CurrentUser.UserId = loginResult.UserId; // //then get user information // var result = await mApiService.PersonGet(mCacheService.CurrentUser.UserId); // if (result != null) // { // mCacheService.CurrentUser = result.Response; // mCacheService.CurrentUser.Password = Password; // mCacheService.CurrentUser.UserId = result.Request.UserId; // BlobCache.UserAccount.InsertObject("CurrentUser", mCacheService.CurrentUser); // Mvx.Resolve<IPlatformService>().SetPreference(AppConstants.IsLogin, true); // } //}else // #endregion if (loginResult.Status.Equals("success")) { //Mvx.Resolve<IMvxMessenger>().Publish(new ToastMessage(this, loginResult.UserId)); mCacheService.SessionId = loginResult.SessionId; mCacheService.CurrentUser = new User(Email, Password); mCacheService.CurrentUser.UserId = loginResult.UserId; BlobCache.UserAccount.InsertObject("SessionId", mCacheService.SessionId); //then get user information var result = await mApiService.PersonGet(mCacheService.CurrentUser.UserId); if (result != null) { mCacheService.CurrentUser = result.Response; mCacheService.CurrentUser.Password = Password; mCacheService.CurrentUser.UserId = result.Request.UserId; BlobCache.UserAccount.InsertObject("CurrentUser", mCacheService.CurrentUser); Mvx.Resolve <IPlatformService>().SetPreference(AppConstants.IsLogin, true); } } else { if (loginResult.ErrorCode.Equals("888")) { Mvx.Resolve <IMvxMessenger> ().Publish(new AlertMessage(this, string.Empty, "Token is incorrect, please contact [email protected]", "Ok", null)); } else { Mvx.Resolve <IMvxMessenger> ().Publish(new AlertMessage(this, string.Empty, string.Format("{0}: {1}", loginResult.Status, loginResult.ErrorCode), "Ok", null)); } Mvx.Resolve <IMvxMessenger>().Publish(new ProgressMessage(this, false)); return; } } else { Mvx.Resolve <IMvxMessenger>().Publish(new AlertMessage(this, string.Empty, string.Format("Email or password is incorrect"), "Ok", null)); Mvx.Resolve <IMvxMessenger>().Publish(new ProgressMessage(this, false)); return; } Mvx.Resolve <IMvxMessenger>().Publish(new ProgressMessage(this, false)); } else { Mvx.Resolve <IMvxMessenger>().Publish(new ToastMessage(this, SharedTextSource.GetText("TurnOnInternetText"))); } //then go to menu page ShowViewModel <MenuViewModel>(); Close(this); } else { Mvx.Resolve <IMvxMessenger>().Publish(new ToastMessage(this, results.Errors[0].ToString().Trim())); } Mvx.Resolve <IMvxMessenger>().Publish(new ProgressMessage(this, false)); }
private void InContentMouseUp(BaseView view, MouseEventArgs e) { // Get the DateSelection start and end // from the current mouse location DateTime startDate, endDate; if (calendarView1.GetDateSelectionFromPoint( e.Location, out startDate, out endDate) == true) { //yaha pa dateclick ka record show karwa dena // If this date already falls outside the currently // selected range (DateSelectionStart and DateSelectionEnd) // then select the new range if (IsDateSelected(startDate, endDate) == false) { calendarView1.DateSelectionStart = startDate; calendarView1.DateSelectionEnd = endDate; } } // Remove any previously added view specific items for (int i = InContentContextMenu.SubItems.Count - 1; i > 3; i--) { InContentContextMenu.SubItems.RemoveAt(i); } // If this is a TimeLine view, then add a couple // of extra items if (view is TimeLineView) { ButtonItem bi = new ButtonItem(); // Page Navigator bi.Text = (calendarView1.TimeLineShowPageNavigation == true) ? "Hide Page Navigator" : "Show Page Navigator"; bi.BeginGroup = true; bi.Click += BiPageNavigatorClick; InContentContextMenu.SubItems.Add(bi); // Condensed Visibility if (calendarView1.TimeLineCondensedViewVisibility == eCondensedViewVisibility.Hidden) { bi = new ButtonItem("", "Show Condensed View"); bi.Click += BiCondensedClick; InContentContextMenu.SubItems.Add(bi); } } ShowContextMenu(InContentContextMenu); }
private void getInfoUser(string username) { DBClass _db = new DBClass(); DataRow r = _db.get_Info_user_cms(username); if (r != null) { txtUserName.Text = BaseView.GetStringFieldValue(r, "username"); txtHoTen.Text = BaseView.GetStringFieldValue(r, "hoten"); txtDienThoai.Text = BaseView.GetStringFieldValue(r, "sodt"); txtEmail.Text = BaseView.GetStringFieldValue(r, "email"); string URLImages = BaseView.GetStringFieldValue(r, "URLImages") == "" ? "~/admin-us/upload/user/noimg.png" : "~/admin-us/upload/user/" + BaseView.GetStringFieldValue(r, "URLImages"); imgBS.ImageUrl = URLImages; bool user = BaseView.GetBooleanFieldValue(r, "isAdmin"); if (user == true) { ddlUser.SelectedValue = "1"; getQuyen(); } else { ddlUser.SelectedValue = "0"; getQuyen(); } } }
protected void btnCapNhat_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(Request.QueryString["id"])) { int autoId = ToSQL.SQLToInt(Request.QueryString["id"]); string content = txtContent.Text; DataRow row = _db.Get_Info_News(autoId); string _title, _desc, _keywords, _tieude, _tomtat, _maloai, _hinhanh, _url; int _iSeo = 0; if (row != null) { _title = BaseView.GetStringFieldValue(row, "title"); _desc = BaseView.GetStringFieldValue(row, "desc"); _tieude = BaseView.GetStringFieldValue(row, "tieude"); _tomtat = BaseView.GetStringFieldValue(row, "tomtat"); _maloai = BaseView.GetStringFieldValue(row, "maloai"); _keywords = BaseView.GetStringFieldValue(row, "keywords"); _hinhanh = BaseView.GetStringFieldValue(row, "HinhAnh"); _url = BaseView.GetStringFieldValue(row, "url"); if (BaseView.GetStringFieldValue(row, "tinh") == "1") { _iSeo = 1; } _db.OnInsert_Update_Delete_News(autoId, "", _title, _desc, _keywords, BaseView.replaceLinkHtml(_tieude), DateTime.Now, _tomtat, content, false, _hinhanh, ToSQL.SQLToInt(_maloai), _url, "", "", 1, _iSeo, "admin", null, "", "", "update"); Response.Redirect("~/" + urlCode()); } } }
protected void Page_Load(object sender, EventArgs e) { AppData appData = AppData.GetAppData(); UserData userData = UserData.GetUserData(); #if DEBUG userData.LoginForDebug(); string chartTitle = "Debug"; #endif // перевод веб-страницы Translator.TranslatePage(Page, "Scada.Web.Plugins.Chart.WFrmChart"); // получение параметров запроса // получить номера как массивы для корректной работы в составе дэшборда int[] cnlNums = Request.QueryString.GetParamAsIntArray("cnlNum"); int[] viewIDs = Request.QueryString.GetParamAsIntArray("viewID"); int cnlNum = cnlNums.Length > 0 ? cnlNums[0] : 0; int viewID = viewIDs.Length > 0 ? viewIDs[0] : 0; DateTime startDate = Request.QueryString.GetParamAsDate(DateTime.Today); // проверка входа в систему и прав if (!userData.LoggedOn) { throw new ScadaException(WebPhrases.NotLoggedOn); } if (!userData.UserRights.GetUiObjRights(viewID).ViewRight) { throw new ScadaException(CommonPhrases.NoRights); } #if !DEBUG // в режиме отладки невозможно получить представление, т.к. плагины не загружены BaseView view = userData.UserViews.GetView(viewID, true); if (!view.ContainsCnl(cnlNum)) { throw new ScadaException(CommonPhrases.NoRights); } // вывод заголовка Title = cnlNum + " - " + Title; string chartTitle = view.Title; #endif // вывод дополнительной информации chartTitle += (string.IsNullOrEmpty(chartTitle) ? "" : ", ") + startDate.ToLocalizedDateString(); string chartStatus = DateTime.Now.ToLocalizedString(); // подготовка данных графика ChartDataBuilder dataBuilder = new ChartDataBuilder(new int[] { cnlNum }, startDate, 1, appData.DataAccess); dataBuilder.FillCnlProps(); dataBuilder.FillData(); // build client script sbClientScript = new StringBuilder(); dataBuilder.ToJs(sbClientScript); sbClientScript .AppendFormat("var locale = '{0}';", Localization.Culture.Name).AppendLine() .AppendFormat("var gapBetweenPoints = {0};", userData.WebSettings.ChartGap).AppendLine() .AppendFormat("var chartTitle = '{0}';", HttpUtility.JavaScriptStringEncode(chartTitle)).AppendLine() .AppendFormat("var chartStatus = '{0}';", chartStatus).AppendLine() .AppendLine(); }
public static void Hookup <T>(BaseView view, UnitOfWork unitOfWork, BarButtonItem saveChangesItem, BarButtonItem discardChangesItem, XPBaseCollection topLevelCollection) where T : class { Hookup <T>(view, unitOfWork, saveChangesItem, discardChangesItem, topLevelCollection, null, null, null, null, null, null, null, null); }
protected void btnPost_Click(object sender, EventArgs e) { //if (txtUrl.Text.Trim() != "") //{ //DataRow dr = _db.Get_URL_Pages(txtUrl.Text.Trim()); //if (dr == null) //{ string sqlCommand = ""; int autoId = 0; if (!String.IsNullOrEmpty(Request.QueryString["id"])) { sqlCommand = "update"; autoId = ToSQL.SQLToInt(Request.QueryString["id"]); } if (autoId == 0)//& dr == null) { sqlCommand = "insert"; } string content = txtContent.Text; string url = txtUrl.Text; if (url == "") { url = linkReplace(txtTieuDe.Text) + ".html"; } string _title = txtTitle.Text; if (_title == "") { _title = txtTieuDe.Text; } string _desc = txtDesc.Text; if (_desc == "") { _desc = txtTomTat.Text; } _db.OnInsert_Update_Delete_Pages(autoId, txtCssClass.Text, _title, _desc, lbIDKey.Text, BaseView.replaceLinkHtml(txtTieuDe.Text), DateTime.Now, txtTomTat.Text, content, chkHienThi.Checked, getImage(), url, "admin", sqlCommand); Response.Redirect("~/admin-us/trang/"); //} //else //{ // lbError.Text = "Url đã tồn tại, vui long thay đổi url khác"; //} //} }
public override BaseViewInfo CreateViewInfo(BaseView view) { return(new MyGridViewInfo((MyGridView)view)); }
private int Post(string url, string hinhdaidien, int idLoai, int idRSS) { try { DBClass _db = new DBClass(); string title = "", description = "", content = ""; HtmlWeb hw = new HtmlWeb(); HtmlDocument doc = hw.Load(url); DataRow rowNode = _db.sqlGetDataRow("select * from RssGroups where id in (select idGroup from RssFeeds where id = " + idRSS + ")");// get tag </> form Group if (rowNode != null) { string titleNode = BaseView.GetStringFieldValue(rowNode, "Tagtitle"); HtmlNodeCollection nodetitle_news = doc.DocumentNode.SelectNodes("//" + titleNode); title = ""; foreach (var item in nodetitle_news) { title += item.InnerText + Environment.NewLine; } string nodeDesc = BaseView.GetStringFieldValue(rowNode, "TagDesc"); HtmlNodeCollection nodeshort_intro = doc.DocumentNode.SelectNodes("//" + nodeDesc); description = ""; foreach (var item in nodeshort_intro) { description += item.InnerText + Environment.NewLine; } content = ""; string nodeContent = BaseView.GetStringFieldValue(rowNode, "TagContent"); HtmlNodeCollection node = doc.DocumentNode.SelectNodes("//" + nodeContent); foreach (var item in node) { string sHtml = BaseView.RemoveLinks(item.InnerHtml) + Environment.NewLine; content += sHtml; } // Process Images int beginIndex = content.IndexOf("src="); string ctSub = ""; try { ctSub = content.Substring(beginIndex, content.Length - beginIndex); } catch { } int endIndex = ctSub.IndexOf(".jpg"); if (endIndex == -1) { endIndex = ctSub.IndexOf(".gif"); } if (endIndex == -1) { endIndex = ctSub.IndexOf(".png"); } if (endIndex == -1) { endIndex = ctSub.IndexOf(".jpeg"); } string hinhDaiDien = ""; try { hinhDaiDien = ctSub.Substring(5, ((endIndex) - (5)) + 4); } catch { } // Process link string[] a = url.Split('/'); if (a.Length > 2) { content += "<div class='nguon'> Nguồn: " + a[2] + "</div>"; } string url_friendly = a[a.Length - 1]; if (BaseView.CheckImg(hinhdaidien) == false) { hinhdaidien = hinhDaiDien; } if (BaseView.CheckImg(hinhdaidien) == false) { hinhdaidien = "noImg.png"; } //else{ //string[] h = hinhdaidien.Split('/'); //using (WebClient wc = new WebClient()) //wc.DownloadFile(hinhdaidien, Server.MapPath("~/uploadFile/postImages/" + h[h.Length-1])); //hinhdaidien = h[h.Length-1]; //} // Save to database return(SavePost(url, title, description, content, hinhdaidien, url_friendly, idLoai)); } return(0); } catch { return(0); } }
public override BaseViewPainter CreatePainter(BaseView view) { return(new CustomGridPainter(view as GridView)); }
protected override void RegisterView(BaseView gv) { base.RegisterView(gv); }
public override DevExpress.XtraGrid.Views.Base.ViewInfo.BaseViewInfo CreateViewInfo(BaseView view) { return(new CustomGridViewInfo(view as GridView)); }
protected override void RegisterView(BaseView gv) { base.RegisterView(gv); if ((OnStyleControl != null) && !base.DesignMode) { if (OnStyleControl != null) { OnStyleControl(gv, EventArgs.Empty); } if (this.FinishedStyling != null) { this.FinishedStyling(this, EventArgs.Empty); } if (gv is GridView) { GridView gridView = gv as GridView; GridLocalizer.Active = sLoc; gridView.RowCountChanged += new EventHandler(this.gridView_RowCountChanged); this.CheckGridExpand(gridView); } } }
public override DevExpress.XtraGrid.Views.Base.Handler.BaseViewHandler CreateHandler(BaseView view) { return(new CustomGridHandler(view as GridView)); }
public void Export(BaseView view) { _exportView = view; Export(); }
public void InitPluginCore( TabPage pluginScreenSpace, Label pluginStatusText) { this.PluginStatusLabel = pluginStatusText; AppLog.LoadConfiguration(AppLog.HojoringConfig); this.AppLogger.Trace(Assembly.GetExecutingAssembly().GetName().ToString() + " start."); try { Logger.Init(); Logger.Write("Plugin Start."); pluginScreenSpace.Text = "SPESPE"; // .NET Frameworkのバージョンを確認する if (!UpdateChecker.IsAvalableDotNet()) { return; } // 設定ファイルを読み込む Settings.Default.Load(); Settings.Default.ApplyRenderMode(); // 最小化する? if (Settings.Default.IsMinimizeOnStart) { ActGlobals.oFormActMain.WindowState = FormWindowState.Minimized; Application.DoEvents(); } // HojoringのSplashを表示する WPFHelper.Start(); UpdateChecker.ShowSplash(); // アップデートを確認する Task.Run(() => { this.Update(); }); // 自身の場所を格納しておく var plugin = ActGlobals.oFormActMain.PluginGetSelfData(this.PluginRoot); if (plugin != null) { this.Location = plugin.pluginFile.DirectoryName; } // 設定ファイルを読み込む SpellPanelTable.Instance.Load(); SpellTable.Instance.Load(); TickerTable.Instance.Load(); TagTable.Instance.Load(); // 設定ファイルのバックアップを作成する SpellPanelTable.Instance.Backup(); SpellTable.Instance.Backup(); TickerTable.Instance.Backup(); TagTable.Instance.Backup(); // TTS辞書を読み込む TTSDictionary.Instance.Load(); // 設定Panelを追加する var baseView = new BaseView(pluginScreenSpace.Font); pluginScreenSpace.Controls.Add(new ElementHost() { Child = baseView, Dock = DockStyle.Fill, Font = pluginScreenSpace.Font, }); // 本体を開始する PluginMainWorker.Instance.Begin(); TimelineController.Init(); // 付加情報オーバーレイを表示する LPSView.ShowLPS(); POSView.ShowPOS(); this.SetSwitchVisibleButton(); this.PluginStatusLabel.Text = "Plugin Started"; Logger.Write("Plugin Started."); } catch (Exception ex) { ActGlobals.oFormActMain.WriteExceptionLog( ex, "Plugin init error."); Logger.Write("Plugin init error.", ex); if (this.PluginStatusLabel != null) { this.PluginStatusLabel.Text = "Plugin Initialize Error"; } ModernMessageBox.ShowDialog( "Plugin init error !", "ACT.SpecialSpellTimer", System.Windows.MessageBoxButton.OK, ex); } }
/// <summary> /// 根据UIPanelName 打开面板 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="name"></param> /// <param name="isTop">是否设置最顶层</param> /// <param name="paramArray"></param> /// <returns></returns> public T OpenWindow <T>(UIPanelName name, bool isTop = true, params object[] paramArray) where T : BaseView { if (!m_nameViewDic.ContainsKey(name)) { if (UIConfig.Instance.m_panelDic.ContainsKey(name)) { UIPanelConfig panelConfig = UIConfig.Instance.m_panelDic[name]; BaseView view = System.Activator.CreateInstance(Type.GetType(panelConfig.ClassName)) as BaseView; if (view != null) { var obj = ObjectsManager.Instance.InstantiateGameObj(panelConfig.Path, false, false); if (obj != null) { view.m_gameObj = obj; view.m_trans = view.m_gameObj.transform as RectTransform; if (panelConfig.Layer == UILayer.None || panelConfig.Layer == UILayer.NormalLayer) { view.m_trans.SetParent(m_normalLayerTr); } else if (panelConfig.Layer == UILayer.BaseLayer) { } else if (panelConfig.Layer == UILayer.TipsLayer) { } else if (panelConfig.Layer == UILayer.TopLayer) { } view.Init(); m_nameViewDic.Add(name, view); if (isTop) { view.m_trans.SetAsLastSibling(); } view.OnShow(); return(view as T); } else { Debug.LogError(string.Format("该路径{0}没有对应的prefab: {1}", panelConfig.Path, panelConfig.PrefabName)); } } else { Debug.LogError("无法创建View, 请检查类名"); } } else { Debug.LogError("不存在该Panel : " + name); } } else { BaseView temp = m_nameViewDic[name]; if (temp != null) { temp.OnShow(); } } return(null); }
public override BaseViewHandler CreateHandler(BaseView view) { return new CommonGridHandler(view as GridView); }
/// <summary> /// 进入游戏 /// </summary> /// <param name="data"></param> private void ServerCreateJoinRoom(NNCreateJoinRoomData data) { #if YYVOICE //登陆呀呀语音(step=2) YYsdkManager.instance.LoginVoiceServer(PlayerModel.Inst.UserInfo.userId); #endif if (PlayerModel.Inst.address != null) { NetProcess.SendRequest <SendAddrReq>(PlayerModel.Inst.address, NNProtoIdMap.CMD_SendAddress, (msgData) => { SQDebug.Log("gps 返回"); }, false); } NiuniuModel.Inst.mGameId = (eGameType)data.roomInfo.gameId; NiuniuModel.Inst.mSubGameId = data.roomInfo.subGameId; NiuniuModel.Inst.mRoomRules = data.roomInfo.rule; NiuniuModel.Inst.mZhuangSeatId = data.roomInfo.zhuangSeatId; NiuniuModel.Inst.mMySeatId = data.roomInfo.mySeatId; NiuniuModel.Inst.mGoldPattern = data.roomInfo.pt; NiuniuModel.Inst.mGameState = (eNNGameState)data.roomInfo.gameState; NiuniuModel.Inst.mRoomId = data.roomInfo.roomId; NiuniuModel.Inst.mRoomState = data.roomInfo.roomState; if (data.roomInfo.playerList != null) { for (int i = 0; i < data.roomInfo.playerList.Count; i++) { PlayerSeatDown(data.roomInfo.playerList[i]); } } if (data.roomInfo.handCardsList != null) { if (data.roomInfo.handCardsList.myCardsInfo != null) { NiuniuModel.Inst.mQzListValue = data.roomInfo.handCardsList.myCardsInfo.qzListValue; NiuniuModel.Inst.mXzListValue = data.roomInfo.handCardsList.myCardsInfo.xzListValue; if (data.roomInfo.handCardsList.myCardsInfo.qzListValue != null || data.roomInfo.handCardsList.myCardsInfo.xzListValue != null) { NiuniuModel.Inst.mGameed = true; NiuniuModel.Inst.mGameedSeatIdList.Add(data.roomInfo.mySeatId); } } if (data.roomInfo.handCardsList.otherCardsInfo != null) { for (int i = 0; i < data.roomInfo.handCardsList.otherCardsInfo.Count; i++) { if (data.roomInfo.handCardsList.otherCardsInfo[i].qzListValue != null || data.roomInfo.handCardsList.otherCardsInfo[i].xzListValue != null) { NiuniuModel.Inst.mGameedSeatIdList.Add(data.roomInfo.handCardsList.otherCardsInfo[i].seatId); } } } } OpenWindow(); mView.ServerCreateJoinRoom(data); if (mView != null) { mView.mSelfPlayer.SetChanagDeskBtnState(true); mView.mSelfPlayer.SetReadyBtnState(true); } List <string> names = new List <string>(); names.Add(typeof(NiuniuGameView).Name); BaseView.CloseAllViewBut(names); }
public override BaseViewInfo CreateViewInfo(BaseView view) { return new CommonGridViewInfo(view as GridView); }
private int _PosHeight; // Calculated window height #endregion /// <summary> /// Constructor /// </summary> public PosWin(BaseView view) { _View = view; InitializeComponent(); }
/// <summary> /// Constructor /// </summary> /// <param name="baseView"></param> /// <param name="appointment"></param> public AppointmentMonthView(BaseView baseView, Appointment appointment) : base(baseView, appointment) { }
public override BaseViewPainter CreatePainter(BaseView view) { return(new CustomGridPainter(view as DevExpress.XtraGrid.Views.Grid.GridView)); }
private int SavePost(string url_from_rss, string tieude, string description, string content, string img, string code_url_friendly, int idLoai) { try { DBClass _db = new DBClass(); if (checkNews(url_from_rss) == 0) { if (code_url_friendly.Length > 50) { code_url_friendly = code_url_friendly.Substring(0, 50); } if (code_url_friendly.Trim().Length == 0) { code_url_friendly = BaseView.RemoveKiTuDacBietVaKhoangTrang(tieude.ToLower()) + ".html"; } else { if (code_url_friendly.IndexOf(".html") == -1) { code_url_friendly = code_url_friendly + ".html"; } } if (content.Trim().Length > 200) { DataRow rowL = _db.get_info_loai(idLoai); if (rowL != null) { _db.OnInsert_Update_Delete_News(0, url_from_rss, tieude, description, "", tieude, ToSQL.SQLToDateRic(BaseView.getDateTimeNow()), description, content, true, img, idLoai, code_url_friendly, "", "", 0, 0, "", null, "", "", "insert"); // ltHome.Text +="<img src='"+ img+ "'/></br>"; return(1); } } } return(0); } catch { return(0); } }
public override BaseViewPainter CreatePainter(BaseView view) { return new CommonGridPainter(view as GridView); }
internal void Suspend() { BgmPlayer.PauseAll(); BaseView.AppSuspend(); }
/// <summary> /// Constructor /// </summary> /// <param name="baseView"></param> /// <param name="appointment"></param> public AppointmentTimeLineView(BaseView baseView, Appointment appointment) : base(baseView, appointment) { }
internal void Resume() { BgmPlayer.ResumeAll(); BaseView.AppResume(); }
private void InContentMouseUp(BaseView view, MouseEventArgs e) { if (OnViewClick != null) { OnViewClick(view, e); } DateTime startDate, endDate; if (calendarView.GetDateSelectionFromPoint(e.Location, out startDate, out endDate)) { if (!IsDateSelected(startDate, endDate)) { calendarView.DateSelectionStart = startDate; calendarView.DateSelectionEnd = endDate; } } if (e.Button == MouseButtons.Right) { ShowContextMenu(InContentContextMenu); } }
public override BaseViewInfo CreateViewInfo(BaseView view) { return(new QueryGridViewInfo(view as QueryGridView)); }
public override BaseViewHandler CreateHandler(BaseView view) { return(new QueryGridHandler(view as QueryGridView)); }
public override BaseViewPainter CreatePainter(BaseView view) { return(new QueryGridViewPainter(view as QueryGridView)); }
private void InContentMouseUp(BaseView view, MouseEventArgs e) { DateTime dtInicio, dtFin; if (cvCalendario.GetDateSelectionFromPoint(e.Location, out dtInicio, out dtFin)) { if (esFechaSeleccionada(dtInicio, dtFin) == false) { cvCalendario.DateSelectionStart = dtInicio; cvCalendario.DateSelectionEnd = dtFin; } } for (int i = biEnBlanco.SubItems.Count - 1; i > 3; i--) { biEnBlanco.SubItems.RemoveAt(i); } if (dtInicio >= DateTime.Now.Date) { ShowContextMenu(biEnBlanco); } else { MessageBox.Show("No se pueden editar fechas anteriores", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private string convertStringLinks(string s) { s = BaseView.convertToUnSign2(s); s = BaseView.repalce_UrlFriendly(s); return(s.ToLower()); }
/// <summary> /// Gets whether the indicator is visible /// in the given view /// </summary> /// <param name="calendarView"></param> /// <param name="view"></param> /// <returns></returns> internal bool IsVisible(CalendarView calendarView, BaseView view) { if (_Visibility == eTimeIndicatorVisibility.Hidden) return (false); if (_Visibility == eTimeIndicatorVisibility.AllResources) return (true); return ((calendarView == null || view.DisplayedOwnerKeyIndex == -1 || calendarView.SelectedOwnerIndex == view.DisplayedOwnerKeyIndex)); }
protected void Page_Load(object sender, EventArgs e) { appData = AppData.GetAppData(); userData = UserData.GetUserData(); // проверка входа в систему if (!userData.LoggedOn) { throw new ScadaException(WebPhrases.NotLoggedOn); } // скрытие сообщения об ошибке pnlErrMsg.HideAlert(); if (IsPostBack) { cmdEnabled = (bool)ViewState["CmdEnabled"]; ctrlCnlNum = (int)ViewState["CtrlCnlNum"]; } else { // получение параметров запроса и сохранение во ViewState ctrlCnlNum = Request.QueryString.GetParamAsInt("ctrlCnlNum"); ViewState["CtrlCnlNum"] = ctrlCnlNum; int viewID = Request.QueryString.GetParamAsInt("viewID"); // проверка прав if (!userData.UserRights.GetUiObjRights(viewID).ControlRight || !userData.WebSettings.CmdEnabled) { throw new ScadaException(CommonPhrases.NoRights); } Type viewType = userData.UserViews.GetViewType(viewID); BaseView view = appData.ViewCache.GetView(viewType, viewID, true); if (!view.ContainsCtrlCnl(ctrlCnlNum)) { throw new ScadaException(CommonPhrases.NoRights); } // перевод веб-страницы Translator.TranslatePage(Page, "Scada.Web.Plugins.Table.WFrmCommand"); // получение канала управления CtrlCnlProps ctrlCnlProps = appData.DataAccess.GetCtrlCnlProps(ctrlCnlNum); ViewState["CmdEnabled"] = ctrlCnlProps != null; if (ctrlCnlProps == null) { // вывести сообщение, что канал управления не найден lblCtrlCnlNotFound.Text = string.Format(lblCtrlCnlNotFound.Text, ctrlCnlNum); pnlErrMsg.ShowAlert(lblCtrlCnlNotFound); btnSubmit.Enabled = false; } else { // вывод информации по каналу управления pnlInfo.Visible = true; lblCtrlCnl.Text = HttpUtility.HtmlEncode( string.Format("[{0}] {1}", ctrlCnlProps.CtrlCnlNum, ctrlCnlProps.CtrlCnlName)); lblObj.Text = HttpUtility.HtmlEncode(ctrlCnlProps.ObjNum > 0 ? string.Format("[{0}] {1}", ctrlCnlProps.ObjNum, ctrlCnlProps.ObjName) : ""); lblDev.Text = HttpUtility.HtmlEncode(ctrlCnlProps.KPNum > 0 ? string.Format("[{0}] {1}", ctrlCnlProps.KPNum, ctrlCnlProps.KPName) : ""); // установка видимости поля для ввода пароля pnlPassword.Visible = userData.WebSettings.CmdPassword; // настройка элементов управления в зависимости от типа команды switch (ctrlCnlProps.CmdTypeID) { case BaseValues.CmdTypes.Standard: if (ctrlCnlProps.CmdValArr == null) { pnlRealValue.Visible = true; } else { repCommands.DataSource = GetDiscreteCmds(ctrlCnlProps.CmdValArr); repCommands.DataBind(); pnlDiscreteValue.Visible = true; btnSubmit.Enabled = false; // disable postback on Enter btnSubmit.CssClass = "hide-exec-btn"; // hide Execute button } break; case BaseValues.CmdTypes.Binary: pnlData.Visible = true; break; default: // BaseValues.CmdTypes.Request: ViewState["KPNum"] = ctrlCnlProps.KPNum; break; } } } }
public virtual BaseBuildingController RregisterView(BaseView view) { return this; }
public void AddView(BaseView <T> view) { m_views.Add(view); }
/// <summary> /// Constructor /// </summary> /// <param name="baseView"></param> /// <param name="appointment"></param> public AppointmentWeekDayView(BaseView baseView, Appointment appointment) : base(baseView, appointment) { SetViewEnds(); }
public override BaseViewInfo CreateViewInfo(BaseView view) { return(new MyTileViewInfo(view as MyTileView)); }
// Method that starts the application public void start() { if (user == null) { bv = new BaseView(this); lv = new LoginView(this); //this.user = new User(1, "docent", "meneer", "*****@*****.**", "test", true); Application.Run(lv); } else { lv.Hide(); bv.Show(); } }
public LayoutViewCustomButtonPainter(BaseView view) : base(view) { }
public override void Assign(BaseView v, bool copyEvents) { var xafGridView = (IMasterDetailColumnView)v; ((IMasterDetailColumnView)this).Window = xafGridView.Window; ((IMasterDetailColumnView)this).MasterFrame = xafGridView.MasterFrame; base.Assign(v, copyEvents); }
void DyNamicCreate(Type transType, BaseView view) { if (view.Trans != null && view.Trans.GetType() == transType) { EditorGUILayout.BeginHorizontal(); var tfields = RegisterTrans.mIns.GetFields(selected); foreach (var f in tfields) { KbEditorUtils.UnkownTypeEditorShow(f, view.Trans); } GUILayout.Space(5); if (GUILayout.Button(new GUIContent("-", "it remove an Trans"), EditorStyles.toolbarButton)) { var field = view.GetType().GetField("_Trans", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(view, null); } EditorGUILayout.EndHorizontal(); } else if (view.Trans.GetType() != transType) { EditorGUILayout.HelpBox("Target Type is " + view.Trans.GetType().Name, MessageType.Warning); } }