Ejemplo n.º 1
0
        public MainWindow()
        {
            Console.Out.WriteLine("Initializing publisher GUI......");
            InitializeComponent();
            set_curPath();
            path = Directory.GetCurrentDirectory();
            path = getAncestorPath(3, path);
            string remote_path = Directory.GetCurrentDirectory();

            remote_path = getAncestorPath(4, remote_path);
            remote_path = remote_path + "\\TestFiles";

            serverEndPoint_.machineAddress = "localhost";
            serverEndPoint_.port           = 8080;
            clientEndPoint.machineAddress  = "localhost";
            clientEndPoint.port            = 8081;

            translater = new Translater();
            translater.listen(clientEndPoint);
            processMessages();

            loadDispatcher();
            autoTest("localhost", remote_path);

            remote_LoadNavTab();

            Console.Out.WriteLine("It's all done. Enjoy it.");
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            CurrentDirectory = System.IO.Directory.GetCurrentDirectory();

            // start Comm
            endPoint_ = new CsEndPoint();
            endPoint_.machineAddress = "localhost";
            endPoint_.port           = 8086;
            translater = new Translater();
            translater.listen(endPoint_);

            serverEndPoint_ = new CsEndPoint();
            serverEndPoint_.machineAddress = "localhost";
            serverEndPoint_.port           = 8081;

            // start processing messages
            processMessages();

            sendFileDir_ = CurrentDirectory + "\\SendFiles";
            Directory.CreateDirectory(sendFileDir_);
            translater.SetSendFileDirectory(sendFileDir_);
            //test1();
            DirectoryList = new ObservableCollection <FileItem>();
            SelectedList  = new ObservableCollection <FileItem>();
            ResultList    = new ObservableCollection <String>();
            UpdateDirectoryFiles();
            DirectoryListBox.ItemsSource     = DirectoryList;
            SelectedFilesListBox.ItemsSource = SelectedList;
            ResultFilesListBox.ItemsSource   = ResultList;
            string[] args = Environment.GetCommandLineArgs();
            if (args.Length > 1 && args[1] == "INDEMO")
            {
                StartDemo();
            }
        }
        //----<trigger connection to start comm and load dispatcher>------------------------
        private void Connect_Click(object sender, RoutedEventArgs e)
        {
            // start Comm
            serverEndPoint = new CsEndPoint();
            serverEndPoint.machineAddress = "localhost";
            serverEndPoint.port           = 8080;

            endPoint_ = new CsEndPoint();
            endPoint_.machineAddress = "localhost";
            endPoint_.port           = int.Parse(Environment.GetCommandLineArgs()[1]);

            translater = new Translater();
            translater.listen(endPoint_);
            loadDispatcher();
            processMessages();

            CsMessage msg = new CsMessage();

            msg.add("to", CsEndPoint.toString(serverEndPoint));
            msg.add("from", CsEndPoint.toString(endPoint_));
            msg.add("command", "connect");
            translater.postMessage(msg);
            msg.show();
            msg.remove("command");
            checkoutPathStack_.Push("../Repository");
            ShowRepo();
            Console.WriteLine("\n  Connected to the repo server.");
        }
Ejemplo n.º 4
0
        //----< Load window and set comm>------
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            // start Comm
            endPoint_ = new CsEndPoint();
            endPoint_.machineAddress      = "localhost";
            endPoint_.port                = Int32.Parse(port);
            serverEndPoint                = new CsEndPoint();
            serverEndPoint.machineAddress = "localhost";
            serverEndPoint.port           = 8080;

            translater = new Translater();
            translater.listen(endPoint_);

            // start processing messages
            processMessages();

            // load dispatcher
            loadDispatcher();
            checkInTab.IsEnabled  = false;
            checkOutTab.IsEnabled = false;
            browseTab.IsEnabled   = false;
            queryTab.IsEnabled    = false;

            Console.WriteLine("\n\n Demonstrating the requirement for 1. Connect to server  and 2. Multiple Client");
            Console.WriteLine("\n ------------------------------------------------------------------------------");
            connectToServerTest();
        }
Ejemplo n.º 5
0
        //----< start Comm, fill window display with dirs and files >------

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Demo demoObj = new Demo();

            demoObj.header();
            string[] args = Environment.GetCommandLineArgs();
            Console.WriteLine("Command Argument: " + String.Join(" ", args));

            demoObj.req3();
            demoObj.req4();
            demoObj.req5();
            demoObj.req6();
            demoObj.req7();
            demoObj.req8();
            configPathAndServerEp(args);

            configClientSide();

            // start ClientComm
            translater = new Translater();
            translater.listen(endPoint_);
            // load dispatcher
            loadDispatcher();
            // start processing messages
            processMessages();
            if (demo)
            {
                commandDemoOn();
            }
            commandGetDirsAndFiles();
        }
Ejemplo n.º 6
0
    public override void Init()

    {
        base.Init();

        pawnMrResetti = TutoManager.s_instance.SpawnMmeResetti(new Vector3(0.0f, 0.15f, -0.7f) + GameManager.Instance.ActiveTile.transform.position);



        Etapes = new List <Step>();

        Etapes.Add(new TutoManager.Spawn(pawnMrResetti, jumpAnimationClip));



        Etapes.Add(new TutoManager.Message(pawnMrResetti, Translater.TutoText("SeqMoraleExplained", 0)));

        Etapes.Add(new TutoManager.Message(pawnMrResetti, Translater.TutoText("SeqMoraleExplained", 1)));



        if (isLaunchedDuringASnowEvent)

        {
            Etapes.Add(new TutoManager.Message(pawnMrResetti, Translater.TutoText("SeqMoraleExplained", 2)));

            Etapes.Add(new TutoManager.Message(pawnMrResetti, Translater.TutoText("SeqMoraleExplained", 3)));
        }



        Etapes.Add(new TutoManager.Message(pawnMrResetti, Translater.TutoText("SeqMoraleExplained", 4)));
    }
    private void OnLoad(UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle <TextAsset> handle)
    {
        var translateTextData = handle.Result;
        var translater        = new Translater(translateTextData.text);

        this.text = translater.GetText(textId, Language.Japanese);
    }
Ejemplo n.º 8
0
    public override void Init()
    {
        base.Init();
        if (GameManager.Instance.Ui.goConfirmationPanel.activeSelf)
        {
            foreach (Button b in GameManager.Instance.Ui.goConfirmationPanel.GetComponentsInChildren <Button>())
            {
                b.interactable = false;
            }
        }

        pawnMrResetti = TutoManager.s_instance.SpawnMmeResetti(new Vector3(0.0f, 0.15f, -0.7f) + GameManager.Instance.ActiveTile.transform.position);

        Etapes = new List <Step>();
        Etapes.Add(new TutoManager.Spawn(pawnMrResetti, jumpAnimationClip));

        Etapes.Add(new DeactivateButtons(Translater.TutoText("SeqAshleyEscort", 0)));
        if (GameManager.Instance.Ui.goConfirmationPanel.activeSelf)
        {
            foreach (Button b in GameManager.Instance.Ui.goConfirmationPanel.GetComponentsInChildren <Button>())
            {
                b.interactable = false;
            }
            Etapes.Add(new TutoManager.Message(null, Translater.TutoText("SeqAshleyEscort", 1)));
        }
        Etapes.Add(new ShowEscortAction(Translater.TutoText("SeqAshleyEscort", 1)));
        Etapes.Add(new ReactivateButtons(Translater.TutoText("SeqAshleyEscort", 2)));
    }
Ejemplo n.º 9
0
    void Write()
    {
        Translater.BeginCache <CacheFile>(111, 2, new ulong[] { 1000, 2000 });
        var _cache = new CacheRec()
        {
            actionType = (int)TranslaterDefine.MsgTypes.BuffAction, bFps = 1, eFps = 10
        };

        _cache.recUnits.Add(new RecUnit()
        {
            type = typeof(int), value = 1
        });
        _cache.recUnits.Add(new RecUnit()
        {
            type = typeof(int), value = 1
        });
        _cache.recUnits.Add(new RecUnit()
        {
            type = typeof(int), value = 1
        });
        _cache.recUnits.Add(new RecUnit()
        {
            type = typeof(int), value = 1
        });
        _cache.recUnits.Add(new RecUnit()
        {
            type = typeof(int), value = 1
        });
        _cache.recUnits.Add(new RecUnit()
        {
            type = typeof(int), value = 1
        });
        Translater.AddNewCache(_cache);
        Translater.SaveCache2File(Translater.EndCache());
    }
        //----< start Comm, fill window display with dirs and files >------

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            endPoint_ = new CsEndPoint();
            endPoint_.machineAddress = "localhost";
            endPoint_.port           = 8084;
            translater = new Translater();
            translater.listen(endPoint_);

            // start processing messages
            processMessages();

            // load dispatcher
            loadDispatcher();


            foreach (string t in System.IO.Directory.GetFiles("../../../ClientStr2"))
            {
                FileList1.Items.Add(t.Remove(0, 20));
            }

            DirList1.Items.Add("..");
            foreach (string k in System.IO.Directory.GetDirectories("../../../ClientStr2"))
            {
                DirList1.Items.Add(k.Remove(0, 20));
            }

            Console.WriteLine(System.Environment.NewLine);
            Console.WriteLine("  Testing Remote Repository Prototypes");
            process();
        }
Ejemplo n.º 11
0
        private static bool Init()
        {
            // ReSharper disable once InconsistentlySynchronizedField
            _devStatPairList = new List <DevStatPair>();

            _taskIndex = 0;

            _threads      = new Dictionary <string, Thread>();
            _devStaThread = new Thread(TryGetUpdateStatList);
            _devStaThread.Start();

            try
            {
                _translater = new Translater();
            }
            catch (Exception ex)
            {
                var log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
                log.Error("数据库连接建立失败", ex);
                Console.WriteLine("数据库连接建立失败!");
                Console.ReadKey();
                return(false);
            }

            return(true);
        }
Ejemplo n.º 12
0
        public static List <string> SetData(string s)
        {
            List <string> ua_words = new List <string>();//Список українських слів

            Database.SetInitializer(new CreateDatabaseIfNotExists <Translater>());
            /*Перевірка чи БД існує, якщо ні то база створюється*/
            using (Translater db = new Translater())//Підключення до БД
            {
                db.Configuration.LazyLoadingEnabled = true;

                db.Ukrain.Load();
                var qwe = from p in db.Ukrain
                          where p.English.Word == s.ToLower()
                          select p;


                if (qwe != null)
                {
                    foreach (ua_translate item in qwe)
                    {
                        ua_words.Add(item.Word);
                    }
                }
                else
                {
                    ua_words.Add("Такого слова покіщо немає в нашій базі");
                }
            }
            return(ua_words);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// инициализирует новый экземпляр класса
        /// </summary>
        public Serial(Repository reposit)
        {
            t_mutex      = new Mutex();
            answerWaiter = new ManualResetEvent(true);

            timer = new Timer(TimerElapsed, null, Timeout.Infinite, timerPerion);

            //static_list = new List<Packet>();

            s_mutex = new Mutex();

            port          = new SerialPort();
            passive_mutex = new Mutex();

            calculator = new CalculaterCRC();
            translater = new Translater(TranslaterFunction);

            input  = new List <byte>();
            output = new List <byte>();

            opt_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

            attemptsToRead = 1;
            attemptsCycled = 128;

            waitTimeout = 20;
            repository  = reposit;

            is_primary_done   = false;
            is_secondary_done = false;

            is_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
        }
Ejemplo n.º 14
0
 void Look(int _i)
 {
     if (GameManager.Instance.ListOfSelectedKeepers.Count > 0)
     {
         PawnInstance ki = GameManager.Instance.ListOfSelectedKeepers[0];
         if (goPanneau == null)
         {
             return;
         }
         goPanneau.SetActive(true);
         // Si le personnage peut parler
         if (ki.Data.Behaviours[(int)BehavioursEnum.CanSpeak])
         {
             goPanneau.GetComponentInChildren <Text>().text = Translater.PanelsText(level, 0, CharacterRace.Human);
         }
         else
         {
             if (ki.Data.PawnId == "lucky")
             {
                 goPanneau.GetComponentInChildren <Text>().text = Translater.PanelsText(level, 0, CharacterRace.Cat);
             }
             else
             {
                 goPanneau.GetComponentInChildren <Text>().text = Translater.PanelsText(level, 0, CharacterRace.Dog);
             }
         }
     }
 }
Ejemplo n.º 15
0
        //----< start Comm, fill window display with dirs and files >------

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            // start Comm
            Console.WriteLine("--------------GUI2----------------------");
            endPoint_ = new CsEndPoint();
            endPoint_.machineAddress = "localhost";
            endPoint_.port           = 8083;
            translater = new Translater();
            translater.listen(endPoint_);

            // start processing messages
            processMessages();

            // load dispatcher
            loadDispatcher();

            CsEndPoint serverEndPoint = new CsEndPoint();

            serverEndPoint.machineAddress = "localhost";
            serverEndPoint.port           = 8080;

            pathStack_.Push("../Storage");
            CsMessage msg = new CsMessage();

            msg.add("to", CsEndPoint.toString(serverEndPoint));
            msg.add("from", CsEndPoint.toString(endPoint_));
            msg.add("path", pathStack_.Peek());
            translater.postMessage(msg);
            msg.add("command", "getFiles");
            translater.postMessage(msg);
            initshowfilelist();
        }
Ejemplo n.º 16
0
        //----< start Comm, fill window display with dirs and files >------

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            // start Comm
            endPoint_ = new CsEndPoint();
            endPoint_.machineAddress = "localhost";
            endPoint_.port           = 8082;
            translater = new Translater();
            translater.listen(endPoint_);

            // start processing messages
            processMessages();

            // load dispatcher
            loadDispatcher();

            CsEndPoint serverEndPoint = new CsEndPoint();

            serverEndPoint.machineAddress = "localhost";
            serverEndPoint.port           = 8080;

            PathTextBlock.Text = "Storage";
            pathStack_.Push("../Storage");
            CsMessage msg = new CsMessage();

            msg.add("to", CsEndPoint.toString(serverEndPoint));
            msg.add("from", CsEndPoint.toString(endPoint_));
            msg.add("command", "getDirs");
            msg.add("path", pathStack_.Peek());
            translater.postMessage(msg);
            msg.remove("command");
            msg.add("command", "getFiles");
            translater.postMessage(msg);
            //test1();
        }
Ejemplo n.º 17
0
    public void OnPointerEnter(PointerEventData eventData)
    {
        switch (typeJauge)
        {
        case TypeOfJauge.Action:
            tooltip.GetComponentInChildren <Text>().text = Translater.TooltipText(typeJauge) + GameManager.Instance.GetFirstSelectedKeeper().GetComponent <Behaviour.Keeper>().ActionPoints;
            tooltip.transform.position = transform.position;
            break;

        case TypeOfJauge.Mental:
            tooltip.GetComponentInChildren <Text>().text = Translater.TooltipText(typeJauge) + GameManager.Instance.GetFirstSelectedKeeper().GetComponent <Behaviour.MentalHealthHandler>().CurrentMentalHealth;
            tooltip.transform.position = Input.mousePosition;
            break;

        case TypeOfJauge.Health:
            tooltip.GetComponentInChildren <Text>().text = Translater.TooltipText(typeJauge) + GameManager.Instance.GetFirstSelectedKeeper().GetComponent <Behaviour.Mortal>().CurrentHp;
            tooltip.transform.position = Input.mousePosition;
            break;

        case TypeOfJauge.Hunger:
            tooltip.GetComponentInChildren <Text>().text = Translater.TooltipText(typeJauge) + GameManager.Instance.GetFirstSelectedKeeper().GetComponent <Behaviour.HungerHandler>().CurrentHunger;
            tooltip.transform.position = Input.mousePosition;
            break;
        }
        needToBeShown = true;
    }
Ejemplo n.º 18
0
        protected TypePort t_port = TypePort.Primary; // тип порта

        #endregion Fields

        #region Constructors

        /// <summary>
        /// инициализирует новый экземпляр класса
        /// </summary>
        public Serial(Repository reposit)
        {
            t_mutex = new Mutex();
            answerWaiter = new ManualResetEvent(true);

            timer = new Timer(TimerElapsed, null, Timeout.Infinite, timerPerion);

            //static_list = new List<Packet>();

            s_mutex = new Mutex();

            port = new SerialPort();
            passive_mutex = new Mutex();

            calculator = new CalculaterCRC();
            translater = new Translater(TranslaterFunction);

            input = new List<byte>();
            output = new List<byte>();

            opt_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

            attemptsToRead = 1;
            attemptsCycled = 128;

            waitTimeout = 20;
            repository = reposit;

            is_primary_done = false;
            is_secondary_done = false;

            is_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
        }
Ejemplo n.º 19
0
        //----< window load function >------------------------------------

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            endPoint_ = new CsEndPoint();             // start Comm
            endPoint_.machineAddress = "localhost";
            endPoint_.port           = new Random().Next(10000);
            translater = new Translater();
            translater.listen(endPoint_);
            processMessages();                        // start processing messages
            loadDispatcher();

            popPathStack_.Push("../Checked-in");
            CsEndPoint serverEndPoint = new CsEndPoint();

            serverEndPoint.machineAddress = "localhost";
            serverEndPoint.port           = serverPortNum;
            CsMessage msg = new CsMessage();

            msg.add("to", CsEndPoint.toString(serverEndPoint));
            msg.add("from", CsEndPoint.toString(endPoint_));
            msg.add("command", "getPopDirs");
            msg.add("path", popPathStack_.Peek());
            translater.postMessage(msg);
            msg.remove("command");
            msg.add("command", "getPopFiles");
            translater.postMessage(msg);

            if (index_ != -1)
            {
                autoclick();
            }
        }
Ejemplo n.º 20
0
        //----< open window showing contents of project directory >------

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            string[] args = Environment.GetCommandLineArgs();
            Path = Directory.GetCurrentDirectory();
            string logpath = GetAncestorPath(1, Path);

            Path = GetAncestorPath(2, Path);
            LoadNavTab(Path);
            Clientname = "GUI_client";
            Author     = "Junhao Chen";

            // start Comm
            endPoint_ = new CsEndPoint();
            endPoint_.machineAddress = args[1];
            endPoint_.port           = Convert.ToInt32(args[2]);
            translater = new Translater();
            translater.listen(endPoint_);

            // start processing messages
            ProcessMessages();
            LogPath_t.Text = System.IO.Path.Combine(logpath, "SaveFile");

            // load dispatcher
            LoadDispatcher();

            //automatically test
            if (args[3] == "Demo")
            {
                Test1();
            }
        }
Ejemplo n.º 21
0
        async Task <(string DbSchema, string ObjectName, JObject ObjectSchema)> getSchemaAsync(string objectName)
        {
            string dbSchema = _defaultDbSchema;
            int    pos      = objectName.IndexOf('.');
            string key;

            if (pos > -1)
            {
                key        = objectName;
                dbSchema   = objectName.Left(pos - 1);
                objectName = objectName.Substring(pos + 1);
            }
            else
            {
                key = $"{dbSchema}.{objectName}";
            }

            if (!_schemaCache.TryGetValue(key, out var objectSchema))
            {
                string sch = await _mdb.ExecuteAsync <string>($"select ObjectSchema from SysCat.V_SysSchemas where SchemaName = '{dbSchema}' and " +
                                                              $"ObjectName = '{objectName}'");

                if (sch.IsEmpty())
                {
                    //object schema not found in database
                    throw new KeyNotFoundException(Translater.GetTranslate("S031.MetaStack.Core.SysCat.SysCatManager.getSchema.1", key));
                }
                objectSchema = JObject.Parse(sch);
                lock (objLock)
                    _schemaCache.Add(key, objectSchema);
            }
            return(dbSchema, objectName, objectSchema);
        }
Ejemplo n.º 22
0
    void Start()
    {
        Material mat = GetComponent <MeshRenderer>().material;

        mat.mainTexture = Translater.DeckTexture();
        mat.SetTexture("_EmissionMap", Translater.DeckTexture());
    }
Ejemplo n.º 23
0
        public async Task <List <WorkshopPreview> > GetWorkshops(CancellationToken ct, int workshopSet, bool LocalOnly, bool ForceUpdate)
        {
            //TODO Introduce Pagination
            if (!LocalOnly && (workshopTable.NeedsUpdating(workshopSet) || ForceUpdate))
            {
                TestConnection();
                var queryString = "workshopSetId=" + workshopSet + "&active=true" + "&startingDtBegin=" + DateTime.Now.ToString(DateFormat) + "&startingDtEnd=" + DateTime.MaxValue.AddMonths(-1).ToString(DateFormat) + "&pageSize=9999";
                var response    = await helpsClient.GetAsync("api/workshop/search?" + queryString);

                if (response.IsSuccessStatusCode)
                {
                    var result = await response.Content.ReadAsAsync <GetResponse <Workshop> >();

                    List <Workshop> decodedResponse = result.Results;
                    if (decodedResponse != null)
                    {
                        workshopTable.SetAllByWorkshopSet(decodedResponse, workshopSet);
                    }

                    return(Translater.TranslatePreview(decodedResponse));
                }
            }

            return(Translater.TranslatePreview(workshopTable.GetAll(workshopSet)));
        }
Ejemplo n.º 24
0
    // Use this for initialization
    void Start()
    {
        GetComponent <Interactable>().Interactions.Add(new Interaction(Hint), 0, "Talk", GameManager.Instance.SpriteUtils.spriteMoral);

        goHint = Instantiate(GameManager.Instance.PrefabUIUtils.PrefabContentQuestUI, GameManager.Instance.Ui.goContentQuestParent.transform);
        goHint.transform.localPosition = Vector3.zero;
        goHint.transform.localScale    = Vector3.one;
        goHint.transform.GetChild(1).GetComponent <Image>().sprite = instance.Data.AssociatedSprite;
        if (commeSurLePanneau.Length > 0)
        {
            goHint.transform.GetChild(3).GetComponentInChildren <Text>().text = commeSurLePanneau[indiceMsg];
        }
        else
        {
            goHint.transform.GetChild(3).GetComponentInChildren <Text>().text = "Debug Hint Message";
        }

        goHint.transform.GetChild(4).GetComponent <Text>().text = Translater.PnjName(transform.name);
        Button close = goHint.transform.GetChild(0).GetComponent <Button>();

        close.onClick.RemoveAllListeners();
        close.onClick.AddListener(CloseBox);
        Button validate = goHint.transform.GetChild(goHint.transform.childCount - 3).GetComponent <Button>();

        if (validate != null)
        {
            validate.onClick.RemoveAllListeners();
            validate.onClick.AddListener(CloseBox);
        }
    }
Ejemplo n.º 25
0
    public override void Init()
    {
        base.Init();
        pawnMrResetti = TutoManager.s_instance.SpawnMmeResetti(new Vector3(0.0f, 0.15f, -0.7f) + GameManager.Instance.ActiveTile.transform.position);

        GameManager.Instance.AllKeepersList[0].GetComponent <Behaviour.Keeper>().IsSelected = true;
        GameManager.Instance.AddKeeperToSelectedList(GameManager.Instance.AllKeepersList[0]);

        Button leftBtn = GameManager.Instance.AllKeepersList[0].GetComponent <Behaviour.Keeper>().BtnLeft.GetComponent <Button>();

        leftBtn.interactable = false;
        Button rightBtn = GameManager.Instance.AllKeepersList[0].GetComponent <Behaviour.Keeper>().BtnRight.GetComponent <Button>();

        rightBtn.interactable = false;

        ColorBlock cb = leftBtn.colors;

        cb.disabledColor = Color.white;
        leftBtn.colors   = cb;

        cb = rightBtn.colors;
        cb.disabledColor = Color.white;
        rightBtn.colors  = cb;

        Etapes = new List <Step>();
        Etapes.Add(new TutoManager.Spawn(pawnMrResetti, jumpAnimationClip));

        Etapes.Add(new TutoManager.Message(pawnMrResetti, Translater.TutoText("SeqMultiCharacters", 0)));
        Etapes.Add(new TutoManager.Message(pawnMrResetti, Translater.TutoText("SeqMultiCharacters", 1)));
        Etapes.Add(new ShowCurrentCharacterAvatar(Translater.TutoText("SeqMultiCharacters", 2)));
        Etapes.Add(new TutoManager.Message(pawnMrResetti, Translater.TutoText("SeqMultiCharacters", 3)));
        Etapes.Add(new InteractWithAnotherCharacter(Translater.TutoText("SeqMultiCharacters", 4)));
        Etapes.Add(new FreezeInteractionsForTuto(Translater.TutoText("SeqMultiCharacters", 5)));
        Etapes.Add(new ShortcutPanelTeaching(Translater.TutoText("SeqMultiCharacters", 6)));
    }
Ejemplo n.º 26
0
        /// <summary>
        /// Adds the common coordinate bits back into a Geometry.
        /// The coordinates of the Geometry are changed.
        /// </summary>
        /// <param name="geom">The Geometry to which to add the common coordinate bits.</param>
        public virtual void AddCommonBits(IGeometry geom)
        {
            Translater trans = new Translater(_commonCoord);

            geom.Apply(trans);
            geom.GeometryChanged();
        }
Ejemplo n.º 27
0
        public static string SetData(string s)
        {
            Database.SetInitializer(new CreateDatabaseIfNotExists <Translater>());
            string str = null;

            using (Translater db = new Translater())
            {
                db.Configuration.LazyLoadingEnabled = false;

                db.Ukrain.Load();
                var qwe = from p in db.Ukrain
                          where p.English.Word == s.ToLower()
                          select p;

                if (qwe != null)
                {
                    foreach (ua_translate item in qwe)
                    {
                        str += item.Word;
                    }
                }
                else
                {
                    str = "Такого слова покіщо немає в нашій базі";
                }
            }
            return(str);
        }
Ejemplo n.º 28
0
        //----< open window showing contents of project directory >------
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            cmd = Environment.GetCommandLineArgs();
            processcmd(cmd);
            path     = Directory.GetCurrentDirectory();
            path     = getAncestorPath(3, path);
            path_web = path + "\\LocalConvertedWebpages";
            Loadcmd(cmd);
            endPoint_ = new CsEndPoint();            // start Comm
            endPoint_.machineAddress = "localhost";
            endPoint_.port           = 8081;
            translater = new Translater();
            translater.listen(endPoint_);
            processMessages();          // start processing messages
            loadDispatcher();           // load dispatcher
            CsEndPoint serverEndPoint = new CsEndPoint();

            serverEndPoint.machineAddress = "localhost";
            serverEndPoint.port           = 8080;
            CurrPath.Text = "Storage";
            pathStack_.Push("..");
            CsMessage msg = new CsMessage();

            msg.add("to", CsEndPoint.toString(serverEndPoint));
            msg.add("from", CsEndPoint.toString(endPoint_));
            msg.add("command", "getDirs");
            msg.add("path", pathStack_.Peek());
            translater.postMessage(msg);
            msg.remove("command");
            msg.add("command", "getFiles");
            msg.add("suffix1", suffix1);
            msg.add("suffix2", suffix2);
            translater.postMessage(msg);
            convertfiles();
        }
Ejemplo n.º 29
0
    public void OnPointerEnter(PointerEventData eventData)
    {
        tooltip.GetComponentInChildren <Text>().text = Translater.InteractionName(gameObject.name);
        tooltip.transform.position = transform.position;

        needToBeShown = true;
    }
Ejemplo n.º 30
0
        /// <summary> Adds the common coordinate bits back into a Geometry.
        /// The coordinates of the Geometry are changed.
        ///
        /// </summary>
        /// <param name="geom">the Geometry to which to Add the common coordinate bits
        /// </param>
        /// <returns> the shifted Geometry
        /// </returns>
        public void AddCommonBits(Geometry geom)
        {
            Translater trans = new Translater(this, commonCoord);

            geom.Apply(trans);
            geom.Changed();
        }
Ejemplo n.º 31
0
    public void RefreshDescription()
    {
        if (descriptionPanel == null)
        {
            descriptionPanel = Instantiate(GameManager.Instance.PrefabUIUtils.skillDescriptionPanel, GameManager.Instance.Ui.transform.GetChild(0));
        }
        descriptionPanel.SetActive(false);
        descriptionPanel.GetComponentInChildren <Text>().text = skillData.Description;

        descriptionPanel.GetComponentInChildren <Text>().text += Translater.SkillDescriptionDetails(SkillDescriptionDetailsEnum.Target, skillData);

        if (skillData.IsMeantToHeal)
        {
            descriptionPanel.GetComponentInChildren <Text>().text += Translater.SkillDescriptionDetails(SkillDescriptionDetailsEnum.HealValue, skillData);
        }
        else if (skillData.Damage > 0)
        {
            descriptionPanel.GetComponentInChildren <Text>().text += Translater.SkillDescriptionDetails(SkillDescriptionDetailsEnum.Damage, skillData);
        }

        if (skillData.Boeufs != null && skillData.Boeufs.Length > 0)
        {
            descriptionPanel.GetComponentInChildren <Text>().text += Translater.SkillDescriptionDetails(SkillDescriptionDetailsEnum.Effect, skillData);
        }

        descriptionPanel.transform.localPosition = GameManager.Instance.PrefabUIUtils.skillDescriptionPanel.transform.localPosition;
        descriptionPanel.transform.localScale    = Vector3.one;
    }
Ejemplo n.º 32
0
 /// <summary>
 /// Removes the common coordinate bits from a Geometry.
 /// The coordinates of the Geometry are changed.
 /// </summary>
 /// <param name="geom">The Geometry from which to remove the common coordinate bits.</param>
 /// <returns>The shifted Geometry.</returns>
 public virtual Geometry RemoveCommonBits(Geometry geom)
 {
     if (_commonCoord.X == 0.0 && _commonCoord.Y == 0.0)
         return geom;
     Coordinate invCoord = new Coordinate(_commonCoord);
     invCoord.X = -invCoord.X;
     invCoord.Y = -invCoord.Y;
     Translater trans = new Translater(invCoord);
     geom.Apply(trans);
     geom.GeometryChanged();
     return geom;
 }
Ejemplo n.º 33
0
        private Translater translater; // осуществляет парсинг данных

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Инициализирует новый экземпляр класса
        /// </summary>
        public TcpDevClient()
        {
            socket = null;

            outerMutex = null;
            mutex = new Mutex(false);

            input = new StringBuilder();
            output = new StringBuilder();

            translater = new Translater(TranslaterFunction);
            regex = new Regex("@JOB#\\d{3}#[0-9a-fA-F]*[\\$]", RegexOptions.IgnoreCase);

            timer = new Timer(new TimerCallback(CallBack), null, 0, 100);
            timer.Change(0, 50);
        }
Ejemplo n.º 34
0
 /// <summary>
 /// Adds the common coordinate bits back into a Geometry.
 /// The coordinates of the Geometry are changed.
 /// </summary>
 /// <param name="geom">The Geometry to which to add the common coordinate bits.</param>
 public virtual void AddCommonBits(IGeometry geom)
 {
     Translater trans = new Translater(_commonCoord);
     geom.Apply(trans);
     geom.GeometryChanged();
 }