Пример #1
0
 public void SetTrackingId(string trackingId)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Editor | ScriptIdentity.CoreScript);
     if (!trackingId.StartsWith("UA-"))
     {
         throw new FormatException("Tracking ID was not a valid Google Analytics ID.");
     }
 }
Пример #2
0
 public Widget CreateWidget(string name)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Plugin);
     return(new Widget(name)
     {
         Parent = this, ParentLocked = true
     });
 }
Пример #3
0
 public Toolbar CreateToolbar(string name)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Plugin);
     return(new Toolbar(name)
     {
         Parent = this, ParentLocked = true
     });
 }
Пример #4
0
 public void SetActive(bool active)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Plugin);
     Editor.Current.Dispatcher.InvokeAsync(() =>
     {
         IsChecked = active;
     });
 }
Пример #5
0
 public Button CreateButton(string text, string tooltip, string iconName)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Plugin);
     return(new Button(text, tooltip, iconName, this)
     {
         Parent = this, ParentLocked = true
     });
 }
Пример #6
0
 public void SetIsPlayerAuthenticationRequired(bool required)
 {
     ScriptService.AssertIdentity(ScriptIdentity.CoreScript | ScriptIdentity.Server | ScriptIdentity.Editor);
     _authenticationRequired = true;
 }
Пример #7
0
 public string GetValueString()
 {
     ScriptService.AssertIdentity(ScriptIdentity.Plugin);
     return(ValueString);
 }
Пример #8
0
 public double GetValue()
 {
     ScriptService.AssertIdentity(ScriptIdentity.Plugin);
     return(Value);
 }
Пример #9
0
 public void ClearContent(bool resettingSimulation)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Editor | ScriptIdentity.CoreScript | ScriptIdentity.Plugin);
     ClearChildren();
 }
Пример #10
0
 public void ReportInGoogleAnalytics(string category, string action, string label, int value)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Editor | ScriptIdentity.CoreScript);
     throw new NotImplementedException();
 }
Пример #11
0
 public void Shutdown(int exitCode = 0)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Editor | ScriptIdentity.CoreScript);
     Engine.Shutdown(exitCode);
 }
Пример #12
0
 public void OpenScript(LuaSourceContainer script, int lineNumber = 0)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Plugin);
     CodeEditorViewModel.TryOpenScript(script, lineNumber);
 }
Пример #13
0
 public void Activate(bool exclusiveMouse)
 {
     ScriptService.AssertIdentity(ScriptIdentity.Plugin);
 }