private int menu_width = Screen.width / 5, menu_height = Screen.width / 10; //主菜单每一个按键的宽度和高度 // Start is called before the first frame update void Start() { mode = 0; gameMessage = ""; action = SSDirector.getInstance().currentSceneController as IUserAction; //pixelStyle //pixelFont = Font.Instantiate(Resources.Load("Fonts/ThaleahFat", typeof(Font))) as Font; //if (pixelFont == null) Debug.Log("null"); //pixelFont.fontSize = 50; //pixelFont = Arial; //大字体初始化 bigStyle = new GUIStyle(); bigStyle.normal.textColor = Color.white; bigStyle.normal.background = null; bigStyle.fontSize = 50; bigStyle.alignment = TextAnchor.MiddleCenter; //black blackStyle = new GUIStyle(); blackStyle.normal.textColor = Color.black; blackStyle.normal.background = null; blackStyle.fontSize = 50; blackStyle.alignment = TextAnchor.MiddleCenter; //小字体初始化 smallStyle = new GUIStyle(); smallStyle.normal.textColor = Color.white; smallStyle.normal.background = null; smallStyle.fontSize = 20; smallStyle.alignment = TextAnchor.MiddleCenter; }
public AuthenticateDialog(IUserAction observer, string sk) { this.Build(); this.sessionKey = sk; this.observer = observer; this.Title = "Authentication for session: " + this.sessionKey; }
/// <summary> /// Constructor /// </summary> /// <param name="cc">Object for holding any displayed dialogs</param> /// <param name="action">The action that initiated this command</param> /// <param name="start">Point initially selected at start of command</param> internal NewLineUI(IControlContainer cc, IUserAction action, PointFeature start) : base(cc, action) { m_Start = start; m_End = null; m_CurrentPoint = start; }
// Use this for initialization void Start() { action = SSDirector.getInstance().currentScenceController as IUserAction; sceneController = (SceneController)SSDirector.getInstance().currentScenceController; role = sceneController.role; rig = role.GetComponent <Rigidbody>(); }
/// <summary> /// Adds the supplied action to this list. /// </summary> /// <param name="action">The action to append (not null).</param> /// <exception cref="ArgumentNullException">If a null action was supplied</exception> public void Add(IUserAction action) { if (action==null) throw new ArgumentNullException(); m_Items.Add(action); }
void Start() { if (isLocalPlayer) { action = Director.getInstance().sceneController as IUserAction; } }
/// <summary> /// Creates a new <c>AttachPointUI</c> /// </summary> /// <param name="action">The action that initiated the command</param> internal AttachPointUI(IUserAction action) : base(action) { m_PointType = null; m_Repeat = false; m_Line = null; }
// Use this for initialization void Start() { myobj = SSDirector.getInstance().currentSceneController as FirstController; actions = SSDirector.getInstance().currentSceneController as IUserAction; //mytext = this.transform.Find("Canvas").Find("mytext").GetComponent<Text>(); c = ""; }
// 初始化 void Start() { //获取引用 action = SSDirector.getInstance().currentSceneController as IUserAction; //对场记的状态变更事件进行订阅 SceneController.OnChangeState += DoChangeState; }
// Use this for initialization void Start() { action = Director.getInstance().currentSceneControl as IUserAction; style = new GUIStyle(); style.fontSize = 25; sceneControl = (FirstSceneControl)Director.getInstance().currentSceneControl; }
public AuthenticateDialog(IUserAction observer, string sk) { this.Build (); this.sessionKey = sk; this.observer = observer; this.Title = "Authentication for session: " + this.sessionKey; }
// Use this for initialization void Start() { direct = Director.getInstance(); direct.setFPS(60); action = ((FirstScene)direct.currentSceneController).actionMassager as IUserAction; direct.currentSceneController.LoadResources(); }
void Start() { action = SSDirector.getInstance().currentSceneController as IUserAction; speed = 10; //sR = Singleton<ScoreRecorder>.Instance;//获取计分员单例 sR = ScoreRecorder.getInstance(); }
void Start() { action = SSDirector.GetInstance().CurrentScenceController as IUserAction; text_style.normal.textColor = new Color(0, 0, 0, 1); text_style.fontSize = 16; score_style.normal.textColor = new Color(1, 0, 1, 1); score_style.fontSize = 16; }
/// <summary> /// Creates a new <c>SetTopologyUI</c> /// </summary> /// <param name="action">The action that initiated this command</param> /// <param name="line">The line to change topological status (not null)</param> internal SetTopologyUI(IUserAction action, LineFeature line) : base(action) { if (line==null) throw new ArgumentNullException(); m_Line = line; }
/// <summary> /// Constructor /// </summary> /// <param name="cc">Object for holding any displayed dialogs</param> /// <param name="action">The action that initiated this command</param> /// <param name="start">Point initially selected at start of command</param> internal NewCircularArcUI(IControlContainer cc, IUserAction action, PointFeature start) : base(cc, action, start) { m_IsShortArc = true; m_Circles = null; m_NewArcCircle = null; m_Geom = null; }
void Start() { action = SSDirector.GetInstance().CurrentScenceController as IUserAction; style.normal.textColor = Color.black; style.fontSize = 20; score_style.fontSize = 20; over_style.fontSize = 25; }
/// <summary> /// Creates a new <c>MoveTextUI</c> /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="action">The action that initiated this command</param> /// <param name="text">The text to move (not null)</param> internal MoveTextUI(IControlContainer cc, IUserAction action, TextFeature text) : base(cc, action) { if (text == null) throw new ArgumentNullException(); m_Text = text; }
public void AddNoPerform(IUserAction action) { redo.Clear(); undo.Push(action); var handler = ActionPerformed; if (handler != null) handler(this, EventArgs.Empty); }
// Start is called before the first frame update void Start() { action = SSDirector.GetInstance().CurrentSceneController as IUserAction; textStyle.fontSize = 16; scoreStyle.fontSize = 16; timeStyle.fontSize = 20; gameOverStyle.fontSize = 30; }
public void RunAction(IUserAction action) { UndoQueue.Add(action); action.Apply(); if (RedoQueue.Count != 0) { RedoQueue.Clear(); } }
/// <summary> /// Creates a new <c>AddLabelUI</c> /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="action">The action that initiated this command</param> protected AddLabelUI(IControlContainer cc, IUserAction action) : base(cc, action) { m_Entity = null; m_Width = 0.0; m_Height = 0.0; m_LastPos = null; m_Rotation = CadastralMapModel.Current.DefaultTextRotation; }
public IncomingRequestDialog(IUserAction observer, string username) { Gtk.Application.Invoke(delegate { this.Build(); this.username = username; this.observer = observer; usernamelbl.LabelProp = this.username; }); }
/// <summary> /// Adds the supplied action to this list. /// </summary> /// <param name="action">The action to append (not null).</param> /// <exception cref="ArgumentNullException">If a null action was supplied</exception> public void Add(IUserAction action) { if (action == null) { throw new ArgumentNullException(); } m_Items.Add(action); }
/// <summary> /// Creates a new <c>MovePolygonPositionUI</c> /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="action">The action that initiated this command</param> /// <param name="text">The text to move (not null)</param> internal MovePolygonPositionUI(IControlContainer cc, IUserAction action, TextFeature text) : base(cc, action) { if (text == null) throw new ArgumentNullException(); m_Text = text; m_LastPolygon = m_Text.Container; }
void Start() { action = SSDirector.GetInstance().CurrentScenceController as IUserAction; header_style = new GUIStyle(); header_style.fontSize = 40; text_style = new GUIStyle(); text_style.fontSize = 20; }
void Start() { action = Director.getInstance().currentSceneController as IUserAction; //Calls the TaskOnClick method when you click the Button next.onClick.AddListener(action.clickNext); last.onClick.AddListener(action.clickLast); //m_YourSecondButton.onClick.AddListener(delegate {TaskWithParameters("Hello"); }); }
/// <summary> /// Constructor for a new line subdivision. /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="action">The action that initiated this command</param> /// <exception cref="InvalidOperationException">If a specific line is not currently selected</exception> internal LineSubdivisionUI(IControlContainer cc, IUserAction action) : base(cc, action) { LineFeature selLine = EditingController.SelectedLine; if (selLine == null) throw new InvalidOperationException("You must initially select the line you want to subdivide."); m_Parent = selLine; }
public IncomingRequestDialog(IUserAction observer, string username) { Gtk.Application.Invoke(delegate { this.Build (); this.username = username; this.observer = observer; usernamelbl.LabelProp = this.username; }); }
public void PerformAction(IUserAction action) { action.Do (context); AddNoPerform(action); var handler = ActionPerformed; if (handler != null) handler(this, EventArgs.Empty); }
/// <summary> /// Constructor to subdivide the currently selected line. /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="action">The action that initiated this command</param> internal SimpleLineSubdivisionUI(IControlContainer cc, IUserAction action) : base(cc, action) { LineFeature line = EditingController.SelectedLine; if (line == null) throw new InvalidOperationException("You must initially select the line you want to subdivide."); SetInitialValues(); m_Line = line; }
private void Start() { action = this.gameObject.GetComponent <Attack>(); VirtualButtonBehaviour vbb = btn.GetComponent <VirtualButtonBehaviour>(); if (vbb) { vbb.RegisterEventHandler(this); } }
/// <summary> /// Creates a new <c>MoveTextUI</c> /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="action">The action that initiated this command</param> /// <param name="text">The text to move (not null)</param> internal MoveTextUI(IControlContainer cc, IUserAction action, TextFeature text) : base(cc, action) { if (text == null) { throw new ArgumentNullException(); } m_Text = text; }
/// <summary> /// Constructor for performing a sideshot from the currently selected point. /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="action">The action that initiated this command</param> /// <exception cref="InvalidOperationException">If a specific point is not currently selected</exception> internal RadialUI(IControlContainer cc, IUserAction action) : base(cc, action) { PointFeature from = EditingController.SelectedPoint; if (from == null) throw new InvalidOperationException("You must initially select the point the sideshot radiates from."); m_Dialog = null; m_From = from; }
void Start() { action = SSDirector.getInstance().currentSceneController as IUserAction; label_style.normal.textColor = Color.black; label_style.alignment = TextAnchor.MiddleCenter; label_style.fontSize = 24; detail_style.normal.textColor = Color.black; detail_style.fontSize = 18; }
/// <summary> /// Creates a new <c>SetTopologyUI</c> /// </summary> /// <param name="action">The action that initiated this command</param> /// <param name="line">The line to change topological status (not null)</param> internal SetTopologyUI(IUserAction action, LineFeature line) : base(action) { if (line == null) { throw new ArgumentNullException(); } m_Line = line; }
private bool gameStart = false; //游戏开始 void Start() { action = SSDirector.GetInstance().CurrentScenceController as IUserAction; style1.normal.textColor = Color.black; style1.fontSize = 31; style2.normal.textColor = Color.red; style2.fontSize = 31; buttonStyle = new GUIStyle("button"); buttonStyle.fontSize = 29; }
private bool gameStart = false; //游戏开始 void Start() { action = SceneDirector.GetInstance().CSController as IUserAction; style1.normal.textColor = Color.black; style1.fontSize = 31; style2.normal.textColor = Color.red; style2.fontSize = 31; buttonStyle.fontSize = 29; }
void Start() { action = SSDirector.GetInstance().CurrentScenceController as IUserAction; text_style.normal.textColor = new Color(0, 0, 0, 1); text_style.fontSize = 16; score_style.normal.textColor = new Color(1, 0.92f, 0.016f, 1); score_style.fontSize = 16; over_style.fontSize = 25; StartCoroutine(ShowTip()); }
// Use this for initialization void Start() { action = GameDirector.getInstance().currentSceneController as IUserAction; headerStyle = new GUIStyle(); headerStyle.fontSize = 40; headerStyle.alignment = TextAnchor.MiddleCenter; buttonStyle = new GUIStyle("button"); buttonStyle.fontSize = 30; }
void Start() { action = SSDirector.getInstance().currentSceneController as IUserAction; labelStyle = new GUIStyle(); labelStyle.fontSize = 60; labelStyle.alignment = TextAnchor.MiddleCenter; buttonStyle = new GUIStyle("button"); buttonStyle.fontSize = 35; }
/// <summary> /// Creates a new <c>NewTextUI</c> /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="action">The action that initiated this command</param> internal NewTextUI(IControlContainer cc, IUserAction action) : base(cc, action) { m_NewText = String.Empty; // Get the map's current rotation angle to see if we are // adding horizontal text or not. Remember the value so that // we can restore it when the command finishes. m_Rotation = CadastralMapModel.Current.DefaultTextRotation; m_IsHorizontal = (Math.Abs(m_Rotation) < MathConstants.TINY); }
public static void SubmitEvents(IUserAction userAction) { try { WsAnalyticsListener listener = new WsAnalyticsListener(); foreach (var analyticEvent in userAction.AnalyticEvents) { listener.SendOutlookEventStatistic(analyticEvent.Name, analyticEvent.Properties); } } catch(Exception ex) { Logger.LogError(ex); } }
/// <summary> /// Constructor to extend the currently selected line. /// </summary> /// <param name="cc">The container for any dialogs</param> /// <param name="action">The action that initiated this command</param> /// <exception cref="InvalidOperationException">If a line is not currently selected</exception> internal LineExtensionUI(IControlContainer cc, IUserAction action) : base(cc, action) { LineFeature line = EditingController.SelectedLine; if (line == null) throw new InvalidOperationException("You must initially select the line you want to extend."); // The dialog will be created by Run(). m_Dialog = null; // Remember the line that is being extended. m_ExtendLine = line; // And initialize the parameters for the operation's Execute() call. m_Length = null; m_IsExtendFromEnd = true; m_LineType = null; }
private void FileStatistics(IUserAction action) { MessageBox.Show(action.Title); }
private void FileExit(IUserAction action) { Close(); }
private void FileNew(IUserAction action) { using (NewProjectForm dial = new NewProjectForm()) { if (dial.ShowDialog() == DialogResult.OK) { string projectName = dial.NewProjectName; OnProjectOpening(); Project p = new ProjectDatabase().OpenProject(projectName); AddRecentProject(projectName); } } }
private void FileOpen(IUserAction action) { OpenFile(); }
private void FilePrint(IUserAction action) { MessageBox.Show(action.Title); }
/// <summary> /// Handles the context menu "Short arc" menuitem /// </summary> /// <param name="action">The action that initiated this method call</param> internal void ShortArc(IUserAction action) { m_IsShortArc = true; ErasePainting(); }
/// <summary> /// Handles the context menu "Long arc" menuitem /// </summary> /// <param name="action">The action that initiated this method call</param> internal void LongArc(IUserAction action) { m_IsShortArc = false; ErasePainting(); }
private void FilePrintWindowRotated(IUserAction action) { MessageBox.Show(action.Title); }
private void FileSave(IUserAction action) { Session s = CadastralMapModel.Current.WorkingSession; Debug.Assert(s != null); s.SaveChanges(); }
private void FileShowChanges(IUserAction action) { MessageBox.Show(action.Title); }
private void HelpTopics(IUserAction action) { MessageBox.Show(action.Title); }
private void HelpAbout(IUserAction action) { /* Stopwatch sw = Stopwatch.StartNew(); string wkt = EditingController.Current.GetCoordinateSystemText(); sw.Stop(); MessageBox.Show(wkt); MessageBox.Show("That took " + sw.ElapsedMilliseconds / 1000.0); */ /* string cfile = GlobalUserSetting.Read("ControlFile"); MessageBox.Show(cfile); ControlPoint control; int nfound = 0; double maxShift = 0.0; using (StreamReader sr = File.OpenText(cfile)) { string str; while ((str = sr.ReadLine()) != null) { if (ControlPoint.TryParse(str, out control)) { nfound++; IPosition b = new Position(control.X + 100.0, control.Y); double sfac1 = cmm.CoordinateSystem.GetLineScaleFactor(control, b); double sfac2 = cs.GetLineScaleFactor(control, b); double diff = 100.0 * (sfac1 - sfac2); maxShift = Math.Max(maxShift, Math.Abs(diff)); String msg = String.Format("SF1={0}\t SF2={1}\t diff={2:0.000000}", sfac1, sfac2, diff); } } } MessageBox.Show(String.Format("maxShift={0:0.000000}", maxShift)); return; */ /* // Experiment with recursive query using (Backsight.Data.IConnection ic = Backsight.Data.ConnectionFactory.Create()) { SqlConnection c = ic.Value; string sql = "create table TestChain (EditId int not null, PreviousEditId int not null)"; SqlCommand cmd = new SqlCommand(sql, c); cmd.ExecuteNonQuery(); SqlCommand del = new SqlCommand("DELETE FROM TestChain", c); del.ExecuteNonQuery(); SqlCommand ins = new SqlCommand("insert into TestChain (EditId, PreviousEditId) values (@EditId, @PreviousEditId)", c); SqlParameter p0 = new SqlParameter("@EditId", SqlDbType.Int); SqlParameter p1 = new SqlParameter("@PreviousEditId", SqlDbType.Int); p0.Value = 0; p1.Value = 0; ins.Parameters.Add(p0); ins.Parameters.Add(p1); ins.ExecuteNonQuery(); for (int i=1; i<50000; i++) { p0.Value = i; p1.Value = i-1; ins.ExecuteNonQuery(); } MessageBox.Show("inserted 50000 rows"); } */ /* * * You'll need PK on EditId as well * WITH result(EditId, PreviousEditId) AS ( SELECT EditId, PreviousEditId FROM TestChain WHERE (EditId = 49999) UNION ALL SELECT t.EditId, t.PreviousEditId FROM TestChain AS t, result AS r WHERE t.EditId = r.PreviousEditId and r.EditId != r.PreviousEditId ) SELECT EditId FROM Result OPTION (MAXRECURSION 0) */ }